Commit 4183b994 authored by David S. Miller's avatar David S. Miller Committed by Patrick McHardy

[IPV6]: UDPv6 needs recvmsg csum error path fix too, thanks Olaf.

parent 1caf9958
......@@ -381,6 +381,7 @@ static int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
if (flags & MSG_ERRQUEUE)
return ipv6_recv_error(sk, msg, len);
try_again:
skb = skb_recv_datagram(sk, flags, noblock, &err);
if (!skb)
goto out;
......@@ -458,12 +459,13 @@ static int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
kfree_skb(skb);
}
/* Error for blocking case is chosen to masquerade
as some normal condition.
*/
err = (flags&MSG_DONTWAIT) ? -EAGAIN : -EHOSTUNREACH;
skb_free_datagram(sk, skb);
if (flags & MSG_DONTWAIT) {
UDP6_INC_STATS_USER(UdpInErrors);
goto out_free;
return -EAGAIN;
}
goto try_again;
}
static void udpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment