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 /include/net/route.h | |
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 'include/net/route.h')
-rw-r--r-- | include/net/route.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/net/route.h b/include/net/route.h index a3b9ef74a389..9b0a523bb428 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -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; } |