summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2014-05-06 20:02:50 +0200
committerDavid S. Miller <davem@davemloft.net>2014-05-09 04:50:47 +0200
commitba6b918ab234186d3aa1663e296586a1b526b77a (patch)
tree6a392f2d78ca1956193b774abfba608f31776ec6 /include
parentipv4: move local_port_range out of CONFIG_SYSCTL (diff)
downloadlinux-ba6b918ab234186d3aa1663e296586a1b526b77a.tar.xz
linux-ba6b918ab234186d3aa1663e296586a1b526b77a.zip
ping: move ping_group_range out of CONFIG_SYSCTL
Similarly, when CONFIG_SYSCTL is not set, ping_group_range should still work, just that no one can change it. Therefore we should move it out of sysctl_net_ipv4.c. And, it should not share the same seqlock with ip_local_port_range. BTW, rename it to ->ping_group_range instead. Cc: David S. Miller <davem@davemloft.net> Cc: Francois Romieu <romieu@fr.zoreil.com> Reported-by: Stefan de Konink <stefan@konink.de> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/netns/ipv4.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index 3d95cd475316..b2704fd0ec80 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -20,6 +20,11 @@ struct local_ports {
int range[2];
};
+struct ping_group_range {
+ seqlock_t lock;
+ kgid_t range[2];
+};
+
struct netns_ipv4 {
#ifdef CONFIG_SYSCTL
struct ctl_table_header *forw_hdr;
@@ -72,7 +77,7 @@ struct netns_ipv4 {
int sysctl_ip_no_pmtu_disc;
int sysctl_ip_fwd_use_pmtu;
- kgid_t sysctl_ping_group_range[2];
+ struct ping_group_range ping_group_range;
atomic_t dev_addr_genid;