diff options
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index d98222fba041..2882cc51669e 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -2200,14 +2200,13 @@ static struct inet_protosw tcpv6_protosw = { | |||
2200 | static int tcpv6_net_init(struct net *net) | 2200 | static int tcpv6_net_init(struct net *net) |
2201 | { | 2201 | { |
2202 | int err; | 2202 | int err; |
2203 | struct socket *sock; | ||
2204 | struct sock *sk; | 2203 | struct sock *sk; |
2205 | 2204 | ||
2206 | err = inet_ctl_sock_create(&sock, PF_INET6, SOCK_RAW, IPPROTO_TCP); | 2205 | err = inet_ctl_sock_create(&sk, PF_INET6, SOCK_RAW, IPPROTO_TCP); |
2207 | if (err) | 2206 | if (err) |
2208 | return err; | 2207 | return err; |
2209 | 2208 | ||
2210 | net->ipv6.tcp_sk = sk = sock->sk; | 2209 | net->ipv6.tcp_sk = sk; |
2211 | sk_change_net(sk, net); | 2210 | sk_change_net(sk, net); |
2212 | return err; | 2211 | return err; |
2213 | } | 2212 | } |