Skip to content

Commit

Permalink
ipv4: warn once on passing AF_INET6 socket to ip_recv_error
Browse files Browse the repository at this point in the history
One line change, in response to catching an occurrence of this bug.
See also fix f4713a3 ("net-timestamp: make tcp_recvmsg call ...")

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
wdebruij authored and davem330 committed Dec 9, 2014
1 parent 8d0c469 commit 7ce875e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/ipv4/ip_sockglue.c
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 7ce875e

Please sign in to comment.