diff options
author | Willem de Bruijn <willemb@google.com> | 2014-12-01 04:22:33 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-09 02:20:48 +0100 |
commit | 7ce875e5ecb8562fd44040f69bda96c999e38bbc (patch) | |
tree | 6532ffa06ee9fbffb830bb1e348b9d5dc2d8f090 /net | |
parent | Merge branch 'ebpf-next' (diff) | |
download | linux-7ce875e5ecb8562fd44040f69bda96c999e38bbc.tar.xz linux-7ce875e5ecb8562fd44040f69bda96c999e38bbc.zip |
ipv4: warn once on passing AF_INET6 socket to ip_recv_error
One line change, in response to catching an occurrence of this bug.
See also fix f4713a3dfad0 ("net-timestamp: make tcp_recvmsg call ...")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ip_sockglue.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c index b7826575d215..59eba6c7a512 100644 --- a/net/ipv4/ip_sockglue.c +++ b/net/ipv4/ip_sockglue.c @@ -414,6 +414,8 @@ int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len) int err; int copied; + WARN_ON_ONCE(sk->sk_family == AF_INET6); + err = -EAGAIN; skb = sock_dequeue_err_skb(sk); if (skb == NULL) |