diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-23 21:45:24 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-23 21:45:24 +0100 |
commit | caa445d808d27880f92d866902f6717f4d4cd3ca (patch) | |
tree | c46a564ecbce58310436f0f30b8f3c6d5d93c19b /net/ipv6/ping.c | |
parent | drivers/tty: serial: remove info message (diff) | |
parent | Linux 4.0-rc5 (diff) | |
download | linux-caa445d808d27880f92d866902f6717f4d4cd3ca.tar.xz linux-caa445d808d27880f92d866902f6717f4d4cd3ca.zip |
Merge 4.0-rc5 into tty-next
We want the tty/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 bd46f736f61d..a2dfff6ff227 100644 --- a/net/ipv6/ping.c +++ b/net/ipv6/ping.c @@ -102,9 +102,10 @@ int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 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) { |