diff options
author | David S. Miller <davem@davemloft.net> | 2015-03-10 04:38:02 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-10 04:38:02 +0100 |
commit | 3cef5c5b0b56f3f90b0e9ff8d3f8dc57f464cc14 (patch) | |
tree | 02e95f15bd8a04071a9a36f534a92a066a8ce66a /net/ipv6/ping.c | |
parent | net: bcmgenet: core changes for supporting multiple Rx queues (diff) | |
parent | Merge git://git.kernel.org/pub/scm/virt/kvm/kvm (diff) | |
download | linux-3cef5c5b0b56f3f90b0e9ff8d3f8dc57f464cc14.tar.xz linux-3cef5c5b0b56f3f90b0e9ff8d3f8dc57f464cc14.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/cadence/macb.c
Overlapping changes in macb driver, mostly fixes and cleanups
in 'net' overlapping with the integration of at91_ether into
macb in 'net-next'.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ping.c')
-rw-r--r-- | net/ipv6/ping.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c index fee25c0ed1f5..263a5164a6f5 100644 --- a/net/ipv6/ping.c +++ b/net/ipv6/ping.c @@ -101,9 +101,10 @@ int ping_v6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) if (msg->msg_name) { DECLARE_SOCKADDR(struct sockaddr_in6 *, u, msg->msg_name); - if (msg->msg_namelen < sizeof(struct sockaddr_in6) || - u->sin6_family != AF_INET6) { + if (msg->msg_namelen < sizeof(*u)) return -EINVAL; + if (u->sin6_family != AF_INET6) { + return -EAFNOSUPPORT; } if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != u->sin6_scope_id) { |