diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 2882cc51669e..378cc4002a76 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -2199,21 +2199,13 @@ static struct inet_protosw tcpv6_protosw = { | |||
2199 | 2199 | ||
2200 | static int tcpv6_net_init(struct net *net) | 2200 | static int tcpv6_net_init(struct net *net) |
2201 | { | 2201 | { |
2202 | int err; | 2202 | return inet_ctl_sock_create(&net->ipv6.tcp_sk, PF_INET6, |
2203 | struct sock *sk; | 2203 | SOCK_RAW, IPPROTO_TCP, net); |
2204 | |||
2205 | err = inet_ctl_sock_create(&sk, PF_INET6, SOCK_RAW, IPPROTO_TCP); | ||
2206 | if (err) | ||
2207 | return err; | ||
2208 | |||
2209 | net->ipv6.tcp_sk = sk; | ||
2210 | sk_change_net(sk, net); | ||
2211 | return err; | ||
2212 | } | 2204 | } |
2213 | 2205 | ||
2214 | static void tcpv6_net_exit(struct net *net) | 2206 | static void tcpv6_net_exit(struct net *net) |
2215 | { | 2207 | { |
2216 | sk_release_kernel(net->ipv6.tcp_sk); | 2208 | inet_ctl_sock_destroy(net->ipv6.tcp_sk); |
2217 | } | 2209 | } |
2218 | 2210 | ||
2219 | static struct pernet_operations tcpv6_net_ops = { | 2211 | static struct pernet_operations tcpv6_net_ops = { |