ipv4: Namespaceify ip_default_ttl sysctl knob
Signed-off-by: Nikolay Borisov <kernel@kyup.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
6cd21d7941
commit
fa50d974d1
@@ -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;
|
||||
|
Reference in New Issue
Block a user