]> git.hungrycats.org Git - linux/commitdiff
ipv6: fix typo in fib6_net_exit()
authorEric Dumazet <edumazet@google.com>
Fri, 8 Sep 2017 22:48:47 +0000 (15:48 -0700)
committerSasha Levin <alexander.levin@verizon.com>
Wed, 4 Oct 2017 01:36:49 +0000 (21:36 -0400)
[ Upstream commit 32a805baf0fb70b6dbedefcd7249ac7f580f9e3b ]

IPv6 FIB should use FIB6_TABLE_HASHSZ, not FIB_TABLE_HASHSZ.

Fixes: ba1cc08d9488 ("ipv6: fix memory leak with multiple tables during netns destruction")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
net/ipv6/ip6_fib.c

index 86ef41280a366f96bfbd74cc9077a71dc3c6bfb3..e7a60f5de0979bc0eb45fbf9a2823645f36b2c4d 100644 (file)
@@ -1833,7 +1833,7 @@ static void fib6_net_exit(struct net *net)
        rt6_ifdown(net, NULL);
        del_timer_sync(&net->ipv6.ip6_fib_timer);
 
-       for (i = 0; i < FIB_TABLE_HASHSZ; i++) {
+       for (i = 0; i < FIB6_TABLE_HASHSZ; i++) {
                struct hlist_head *head = &net->ipv6.fib_table_hash[i];
                struct hlist_node *tmp;
                struct fib6_table *tb;