summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-02-16 20:42:55 -0500
committerDavid S. Miller <davem@davemloft.net>2016-02-16 20:42:55 -0500
commit547b9ca879eafeb3507c00dc77002953c9c04b0b (patch)
tree77d8d8bb1fedfda6cd5f15bbb92af822e39319aa /include/net
parent6cd21d79419c154a73be6fa31bc1a1f42ffd6815 (diff)
parent52a773d645e95515016b9d896ba8e323e0aaa57b (diff)
Merge branch 'ip-sysctl-namespaceify'
Nikolay Borisov says: ==================== Namespacify various ip sysctl knobs This series continues namespacifying more net related knobs. The focus here is on ip options. Patches 1,3,4,5 namespacify the respective sysctl knobs. Patch 2 moves some igmp code to the correct file (and function) and also adds some #ifdef guards to silence compilation warnings. Finally, patch 5 exposes the ip fragmentation related sysctls since all of the knobs are namespaced. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/inet_frag.h1
-rw-r--r--include/net/ip.h6
-rw-r--r--include/net/netns/ipv4.h4
-rw-r--r--include/net/route.h5
4 files changed, 7 insertions, 9 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index 12aac0fd6ee7..909972aa3acd 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -13,6 +13,7 @@ struct netns_frags {
int timeout;
int high_thresh;
int low_thresh;
+ int max_dist;
};
/**
diff --git a/include/net/ip.h b/include/net/ip.h
index 1a98f1ca1638..cbb134b2f0e4 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -245,12 +245,6 @@ extern int inet_peer_threshold;
extern int inet_peer_minttl;
extern int inet_peer_maxttl;
-/* From ip_input.c */
-extern int sysctl_ip_early_demux;
-
-/* From ip_output.c */
-extern int sysctl_ip_dynaddr;
-
void ipfrag_init(void);
void ip_static_sysctl_init(void);
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index 848fe8056534..a69cde3ce460 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -80,9 +80,13 @@ struct netns_ipv4 {
int sysctl_tcp_ecn;
int sysctl_tcp_ecn_fallback;
+ int sysctl_ip_default_ttl;
int sysctl_ip_no_pmtu_disc;
int sysctl_ip_fwd_use_pmtu;
int sysctl_ip_nonlocal_bind;
+ /* Shall we try to damage output packets if routing dev changes? */
+ int sysctl_ip_dynaddr;
+ int sysctl_ip_early_demux;
int sysctl_fwmark_reflect;
int sysctl_tcp_fwmark_accept;
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;
}