Commit 0451eb07 authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

[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: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 208d8984
...@@ -163,13 +163,14 @@ static void dsmark_walk(struct Qdisc *sch,struct qdisc_walker *walker) ...@@ -163,13 +163,14 @@ 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;
} }
} }
ignore:
walker->count++; walker->count++;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment