diff options
author | Nikolay Borisov <kernel@kyup.com> | 2016-02-15 11:11:27 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-17 02:42:54 +0100 |
commit | fa50d974d104113630d68b7d03233a6686230d0c (patch) | |
tree | 17a12ad65afc3bf5302eba390262728d1b3b74dc /net/ipv4/ip_sockglue.c | |
parent | Merge tag 'wireless-drivers-next-for-davem-2016-02-12' of git://git.kernel.or... (diff) | |
download | linux-fa50d974d104113630d68b7d03233a6686230d0c.tar.xz linux-fa50d974d104113630d68b7d03233a6686230d0c.zip |
ipv4: Namespaceify ip_default_ttl sysctl knob
Signed-off-by: Nikolay Borisov <kernel@kyup.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_sockglue.c')
-rw-r--r-- | net/ipv4/ip_sockglue.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index 92808f147ef5..3f1befc4e17b 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c @@ -1341,10 +1341,13 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname, val = inet->tos; break; case IP_TTL: + { + struct net *net = sock_net(sk); val = (inet->uc_ttl == -1 ? - sysctl_ip_default_ttl : + net->ipv4.sysctl_ip_default_ttl : inet->uc_ttl); break; + } case IP_HDRINCL: val = inet->hdrincl; break; |