diff options
author | Vasiliy Kulikov <segoon@openwall.com> | 2011-05-16 20:16:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-17 14:16:58 -0400 |
commit | f56e03e8dc149bf0ac2888d6843584f48c8700fc (patch) | |
tree | 071864cd821423ff1caf06d824823b533cbcab77 /net/ipv4 | |
parent | 6dcae1eaee2b437536b2fe928a609f9589691ebf (diff) |
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')
-rw-r--r-- | net/ipv4/ping.c | 13 | ||||
-rw-r--r-- | net/ipv4/sysctl_net_ipv4.c | 12 |
2 files changed, 13 insertions, 12 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 41836ab6c200..6a21da906532 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c | |||
@@ -187,6 +187,19 @@ exit: | |||
187 | return sk; | 187 | return sk; |
188 | } | 188 | } |
189 | 189 | ||
190 | static void inet_get_ping_group_range_net(struct net *net, gid_t *low, gid_t *high) | ||
191 | { | ||
192 | gid_t *data = net->ipv4.sysctl_ping_group_range; | ||
193 | unsigned seq; | ||
194 | do { | ||
195 | seq = read_seqbegin(&sysctl_local_ports.lock); | ||
196 | |||
197 | *low = data[0]; | ||
198 | *high = data[1]; | ||
199 | } while (read_seqretry(&sysctl_local_ports.lock, seq)); | ||
200 | } | ||
201 | |||
202 | |||
190 | static int ping_init_sock(struct sock *sk) | 203 | static int ping_init_sock(struct sock *sk) |
191 | { | 204 | { |
192 | struct net *net = sock_net(sk); | 205 | struct net *net = sock_net(sk); |
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 28e8273bbef8..57d0752e239a 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, | |||
73 | } | 73 | } |
74 | 74 | ||
75 | 75 | ||
76 | void inet_get_ping_group_range_net(struct net *net, gid_t *low, gid_t *high) | ||
77 | { | ||
78 | gid_t *data = net->ipv4.sysctl_ping_group_range; | ||
79 | unsigned seq; | ||
80 | do { | ||
81 | seq = read_seqbegin(&sysctl_local_ports.lock); | ||
82 | |||
83 | *low = data[0]; | ||
84 | *high = data[1]; | ||
85 | } while (read_seqretry(&sysctl_local_ports.lock, seq)); | ||
86 | } | ||
87 | |||
88 | void inet_get_ping_group_range_table(struct ctl_table *table, gid_t *low, gid_t *high) | 76 | void inet_get_ping_group_range_table(struct ctl_table *table, gid_t *low, gid_t *high) |
89 | { | 77 | { |
90 | gid_t *data = table->data; | 78 | gid_t *data = table->data; |