Skip to content

Commit 7315587

Browse files
dsaherndavem330
authored andcommitted
ipv6: Fix dump of specific table with strict checking
Dump of a specific table with strict checking enabled is looping. The problem is that the end of the table dump is not marked in the cb. When dumping a specific table, cb args 0 and 1 are not used (they are the hash index and entry with an hash table index when dumping all tables). Re-use args[0] to hold a 'done' flag for the specific table dump. Fixes: 13e3890 ("net/ipv6: Plumb support for filtering route dumps") Reported-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent be63004 commit 7315587

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

net/ipv6/ip6_fib.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,11 @@ static int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
627627
return -ENOENT;
628628
}
629629

630-
res = fib6_dump_table(tb, skb, cb);
630+
if (!cb->args[0]) {
631+
res = fib6_dump_table(tb, skb, cb);
632+
if (!res)
633+
cb->args[0] = 1;
634+
}
631635
goto out;
632636
}
633637

0 commit comments

Comments
 (0)