diff options
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 59c911f3889d..fee9aabd5aa1 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -2529,12 +2529,17 @@ static int __net_init tcp_sk_init(struct net *net) | |||
2529 | static void __net_exit tcp_sk_exit(struct net *net) | 2529 | static void __net_exit tcp_sk_exit(struct net *net) |
2530 | { | 2530 | { |
2531 | inet_ctl_sock_destroy(net->ipv4.tcp_sock); | 2531 | inet_ctl_sock_destroy(net->ipv4.tcp_sock); |
2532 | inet_twsk_purge(net, &tcp_hashinfo, &tcp_death_row, AF_INET); | 2532 | } |
2533 | |||
2534 | static void __net_exit tcp_sk_exit_batch(struct list_head *net_exit_list) | ||
2535 | { | ||
2536 | inet_twsk_purge(&tcp_hashinfo, &tcp_death_row, AF_INET); | ||
2533 | } | 2537 | } |
2534 | 2538 | ||
2535 | static struct pernet_operations __net_initdata tcp_sk_ops = { | 2539 | static struct pernet_operations __net_initdata tcp_sk_ops = { |
2536 | .init = tcp_sk_init, | 2540 | .init = tcp_sk_init, |
2537 | .exit = tcp_sk_exit, | 2541 | .exit = tcp_sk_exit, |
2542 | .exit_batch = tcp_sk_exit_batch, | ||
2538 | }; | 2543 | }; |
2539 | 2544 | ||
2540 | void __init tcp_v4_init(void) | 2545 | void __init tcp_v4_init(void) |