diff options
author | David S. Miller <davem@davemloft.net> | 2014-11-29 20:47:48 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-29 20:47:48 -0800 |
commit | 60b7379dc5b1743427b031cca53e30860a38ada6 (patch) | |
tree | c0462b8dd188861bd04f36dd31672b7446e35dd8 /net/ipv4/ping.c | |
parent | a523a5ecc8c6ddceb8f783f600605553e5ad8963 (diff) | |
parent | 7a5a4f978750756755dc839014e13d1b088ccc8e (diff) | |
download | linux-60b7379dc5b1743427b031cca53e30860a38ada6.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/ipv4/ping.c')
-rw-r--r-- | net/ipv4/ping.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index ef8f6ee90473..8dd4ae0424fc 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -217,6 +217,8 @@ static struct sock *ping_lookup(struct net *net, struct sk_buff *skb, u16 ident) &ipv6_hdr(skb)->daddr)) continue; #endif + } else { + continue; } if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif) @@ -853,16 +855,8 @@ int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, if (flags & MSG_OOB) goto out; - if (flags & MSG_ERRQUEUE) { - if (family == AF_INET) { - return ip_recv_error(sk, msg, len, addr_len); -#if IS_ENABLED(CONFIG_IPV6) - } else if (family == AF_INET6) { - return pingv6_ops.ipv6_recv_error(sk, msg, len, - addr_len); -#endif - } - } + if (flags & MSG_ERRQUEUE) + return inet_recv_error(sk, msg, len, addr_len); skb = skb_recv_datagram(sk, flags, noblock, &err); if (!skb) |