Skip to content

Commit

Permalink
[PKT_SCHED]: Fix dsmark to count ignored indices while walking
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Graf authored and David S. Miller committed May 31, 2005
1 parent 208d898 commit 0451eb0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/sched/sch_dsmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,15 @@ static void dsmark_walk(struct Qdisc *sch,struct qdisc_walker *walker)
return;
for (i = 0; i < p->indices; i++) {
if (p->mask[i] == 0xff && !p->value[i])
continue;
goto ignore;
if (walker->count >= walker->skip) {
if (walker->fn(sch, i+1, walker) < 0) {
walker->stop = 1;
break;
}
}
walker->count++;
ignore:
walker->count++;
}
}

Expand Down

0 comments on commit 0451eb0

Please sign in to comment.