summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ping.c13
-rw-r--r--net/ipv4/sysctl_net_ipv4.c12
2 files changed, 13 insertions, 12 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);
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 28e8273..57d0752 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -73,18 +73,6 @@ static int ipv4_local_port_range(ctl_table *table, int write,
}
-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));
-}
-
void inet_get_ping_group_range_table(struct ctl_table *table, gid_t *low, gid_t *high)
{
gid_t *data = table->data;
OpenPOWER on IntegriCloud