* [PATCH net-next] ipv6: Avoid going through ->sk_net to access the netns
@ 2017-07-31 8:09 Jakub Sitnicki
2017-08-01 1:02 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Sitnicki @ 2017-07-31 8:09 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller
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>
---
net/ipv6/af_inet6.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index a88b5b5..0a7c740 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -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
--
2.9.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] ipv6: Avoid going through ->sk_net to access the netns
2017-07-31 8:09 [PATCH net-next] ipv6: Avoid going through ->sk_net to access the netns Jakub Sitnicki
@ 2017-08-01 1:02 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-08-01 1:02 UTC (permalink / raw)
To: jkbs; +Cc: netdev
From: Jakub Sitnicki <jkbs@redhat.com>
Date: Mon, 31 Jul 2017 10:09:41 +0200
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-01 1:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-31 8:09 [PATCH net-next] ipv6: Avoid going through ->sk_net to access the netns Jakub Sitnicki
2017-08-01 1:02 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).