summaryrefslogtreecommitdiff
path: root/net/ipv6/af_inet6.c
diff options
context:
space:
mode:
authorJakub Sitnicki <jkbs@redhat.com>2017-07-31 10:09:41 +0200
committerDavid S. Miller <davem@davemloft.net>2017-07-31 18:01:33 -0700
commit1f139ed9ec40521b4497aa34e107d38bb082b0e0 (patch)
tree92e16f99915b618181b4b7b4a9642b81f6ad1cdc /net/ipv6/af_inet6.c
parent98c13bb750b532ab28798d5ff0cb6f951b225fbd (diff)
downloadlwn-1f139ed9ec40521b4497aa34e107d38bb082b0e0.tar.gz
lwn-1f139ed9ec40521b4497aa34e107d38bb082b0e0.zip
ipv6: Avoid going through ->sk_net to access the netns
There is no need to go through sk->sk_net to access the net namespace and its sysctl variables because we allocate the sock and initialize sk_net just a few lines earlier in the same routine. Signed-off-by: Jakub Sitnicki <jkbs@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r--net/ipv6/af_inet6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index a88b5b5b7955..0a7c74049a0c 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -210,7 +210,7 @@ lookup_protocol:
np->mcast_hops = IPV6_DEFAULT_MCASTHOPS;
np->mc_loop = 1;
np->pmtudisc = IPV6_PMTUDISC_WANT;
- np->autoflowlabel = ip6_default_np_autolabel(sock_net(sk));
+ np->autoflowlabel = ip6_default_np_autolabel(net);
sk->sk_ipv6only = net->ipv6.sysctl.bindv6only;
/* Init the ipv4 part of the socket since we can have sockets