summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ping.c
diff options
context:
space:
mode:
authorVasiliy Kulikov <segoon@openwall.com>2011-05-17 00:16:56 +0000
committerDavid S. Miller <davem@davemloft.net>2011-05-17 14:16:58 -0400
commitf56e03e8dc149bf0ac2888d6843584f48c8700fc (patch)
tree071864cd821423ff1caf06d824823b533cbcab77 /net/ipv4/ping.c
parent6dcae1eaee2b437536b2fe928a609f9589691ebf (diff)
downloadop-kernel-dev-f56e03e8dc149bf0ac2888d6843584f48c8700fc.zip
op-kernel-dev-f56e03e8dc149bf0ac2888d6843584f48c8700fc.tar.gz
net: ping: fix build failure
If CONFIG_PROC_SYSCTL=n the building process fails: ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net' Moved inet_get_ping_group_range_net() to ping.c. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ping.c')
-rw-r--r--net/ipv4/ping.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index 41836ab..6a21da9 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -187,6 +187,19 @@ exit:
return sk;
}
+static void inet_get_ping_group_range_net(struct net *net, gid_t *low, gid_t *high)
+{
+ gid_t *data = net->ipv4.sysctl_ping_group_range;
+ unsigned seq;
+ do {
+ seq = read_seqbegin(&sysctl_local_ports.lock);
+
+ *low = data[0];
+ *high = data[1];
+ } while (read_seqretry(&sysctl_local_ports.lock, seq));
+}
+
+
static int ping_init_sock(struct sock *sk)
{
struct net *net = sock_net(sk);
OpenPOWER on IntegriCloud