diff options
author | Patrick McHardy <kaber@trash.net> | 2006-07-08 16:38:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-07-08 16:38:55 -0400 |
commit | 26e0fd1ce2418b10713b569a195bdb679233066b (patch) | |
tree | afe1e76e4285fe79d291726d55a466f7bdc69305 /net/ipv4 | |
parent | a430a43d087545c96542ee64573237919109d370 (diff) |
[NET]: Fix IPv4/DECnet routing rule dumping
When more rules are present than fit in a single skb, the remaining
rules are incorrectly skipped.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/fib_rules.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c index 6c642d11d4ca..773b12ba4e3c 100644 --- a/net/ipv4/fib_rules.c +++ b/net/ipv4/fib_rules.c | |||
@@ -457,13 +457,13 @@ int inet_dump_rules(struct sk_buff *skb, struct netlink_callback *cb) | |||
457 | 457 | ||
458 | rcu_read_lock(); | 458 | rcu_read_lock(); |
459 | hlist_for_each_entry(r, node, &fib_rules, hlist) { | 459 | hlist_for_each_entry(r, node, &fib_rules, hlist) { |
460 | |||
461 | if (idx < s_idx) | 460 | if (idx < s_idx) |
462 | continue; | 461 | goto next; |
463 | if (inet_fill_rule(skb, r, NETLINK_CB(cb->skb).pid, | 462 | if (inet_fill_rule(skb, r, NETLINK_CB(cb->skb).pid, |
464 | cb->nlh->nlmsg_seq, | 463 | cb->nlh->nlmsg_seq, |
465 | RTM_NEWRULE, NLM_F_MULTI) < 0) | 464 | RTM_NEWRULE, NLM_F_MULTI) < 0) |
466 | break; | 465 | break; |
466 | next: | ||
467 | idx++; | 467 | idx++; |
468 | } | 468 | } |
469 | rcu_read_unlock(); | 469 | rcu_read_unlock(); |