diff options
author | Eric Dumazet <edumazet@google.com> | 2013-10-09 06:05:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-09 13:04:03 -0400 |
commit | c2bb06db59eaf92eb5ca9c6faed590597c6ceccb (patch) | |
tree | 7e9018dd587e8ec552d5d101981f42f101b16dcd /net/ipv4/ping.c | |
parent | f69b923a758f598fd6bb69e57564b59506f4f1fc (diff) |
net: fix build errors if ipv6 is disabled
CONFIG_IPV6=n is still a valid choice ;)
It appears we can remove dead code.
Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ping.c')
-rw-r--r-- | net/ipv4/ping.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index ccefc07beacd..9afbdb19f4a2 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c | |||
@@ -415,10 +415,12 @@ int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) | |||
415 | (int)sk->sk_bound_dev_if); | 415 | (int)sk->sk_bound_dev_if); |
416 | 416 | ||
417 | err = 0; | 417 | err = 0; |
418 | if ((sk->sk_family == AF_INET && isk->inet_rcv_saddr) || | 418 | if (sk->sk_family == AF_INET && isk->inet_rcv_saddr) |
419 | (sk->sk_family == AF_INET6 && | ||
420 | !ipv6_addr_any(&sk->sk_v6_rcv_saddr))) | ||
421 | sk->sk_userlocks |= SOCK_BINDADDR_LOCK; | 419 | sk->sk_userlocks |= SOCK_BINDADDR_LOCK; |
420 | #if IS_ENABLED(CONFIG_IPV6) | ||
421 | if (sk->sk_family == AF_INET6 && !ipv6_addr_any(&sk->sk_v6_rcv_saddr)) | ||
422 | sk->sk_userlocks |= SOCK_BINDADDR_LOCK; | ||
423 | #endif | ||
422 | 424 | ||
423 | if (snum) | 425 | if (snum) |
424 | sk->sk_userlocks |= SOCK_BINDPORT_LOCK; | 426 | sk->sk_userlocks |= SOCK_BINDPORT_LOCK; |