[NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS.
[firefly-linux-kernel-4.4.55.git] / net / ipv6 / ip6_output.c
index 556300f0eba53aad1c85ba2f59ec6e7a1781fe5c..a8b4da25b0a777f21158e4da3da99463c135884b 100644 (file)
@@ -910,7 +910,7 @@ static int ip6_dst_lookup_tail(struct sock *sk,
                               struct dst_entry **dst, struct flowi *fl)
 {
        int err;
-       struct net *net = sk->sk_net;
+       struct net *net = sock_net(sk);
 
        if (*dst == NULL)
                *dst = ip6_route_output(net, sk, fl);