Commit bf19cf14 authored by David S. Miller's avatar David S. Miller Committed by Linus Torvalds

[IPV4]: Fix lost routes in fn_hash netlink dumps.

Spotted by itkes@fat.imed.msu.ru, the fn_hash_dump_bucket() main
loop does not increment 'i' properly, and thus routes will not
be listed, when the test 'i < s_i' passes.

The bug was added when the code was converted over to
hlist_for_each_entry() by your's truly.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8ad4c604
......@@ -684,7 +684,7 @@ fn_hash_dump_bucket(struct sk_buff *skb, struct netlink_callback *cb,
list_for_each_entry(fa, &f->fn_alias, fa_list) {
if (i < s_i)
continue;
goto next;
if (fib_dump_info(skb, NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq,
......@@ -699,7 +699,7 @@ fn_hash_dump_bucket(struct sk_buff *skb, struct netlink_callback *cb,
cb->args[3] = i;
return -1;
}
next:
i++;
}
}
......
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