netns : fix kernel panic in timewait socket destruction
[cascardo/linux.git] / net / ipv6 / tcp_ipv6.c
index 5b90b36..b585c85 100644 (file)
@@ -2148,6 +2148,7 @@ static int tcpv6_net_init(struct net *net)
 static void tcpv6_net_exit(struct net *net)
 {
        inet_ctl_sock_destroy(net->ipv6.tcp_sk);
+       inet_twsk_purge(net, &tcp_hashinfo, &tcp_death_row, AF_INET6);
 }
 
 static struct pernet_operations tcpv6_net_ops = {