[PKT_SCHED]: Fix dsmark to count ignored indices while walking

Unused indices which are ignored while walking must still
be counted to avoid dumping the same index twice.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Thomas Graf 2005-05-31 15:15:58 -07:00 committed by David S. Miller
parent 208d89843b
commit 0451eb074e

View File

@ -163,14 +163,15 @@ static void dsmark_walk(struct Qdisc *sch,struct qdisc_walker *walker)
return; return;
for (i = 0; i < p->indices; i++) { for (i = 0; i < p->indices; i++) {
if (p->mask[i] == 0xff && !p->value[i]) if (p->mask[i] == 0xff && !p->value[i])
continue; goto ignore;
if (walker->count >= walker->skip) { if (walker->count >= walker->skip) {
if (walker->fn(sch, i+1, walker) < 0) { if (walker->fn(sch, i+1, walker) < 0) {
walker->stop = 1; walker->stop = 1;
break; break;
} }
} }
walker->count++; ignore:
walker->count++;
} }
} }