mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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:
parent
6cd21d7941
commit
fa50d974d1
8 changed files with 26 additions and 21 deletions
|
@ -329,14 +329,13 @@ static inline int inet_iif(const struct sk_buff *skb)
|
|||
return skb->skb_iif;
|
||||
}
|
||||
|
||||
extern int sysctl_ip_default_ttl;
|
||||
|
||||
static inline int ip4_dst_hoplimit(const struct dst_entry *dst)
|
||||
{
|
||||
int hoplimit = dst_metric_raw(dst, RTAX_HOPLIMIT);
|
||||
struct net *net = dev_net(dst->dev);
|
||||
|
||||
if (hoplimit == 0)
|
||||
hoplimit = sysctl_ip_default_ttl;
|
||||
hoplimit = net->ipv4.sysctl_ip_default_ttl;
|
||||
return hoplimit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue