mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
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>
This commit is contained in:
parent
98c13bb750
commit
1f139ed9ec
1 changed files with 1 additions and 1 deletions
|
@ -210,7 +210,7 @@ static int inet6_create(struct net *net, struct socket *sock, int 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
|
||||
|
|
Loading…
Reference in a new issue