net: Fix inverted test in __skb_recv_datagram
As the kernel generally uses negated error numbers, *err needs to be
compared with -EAGAIN (d'oh).
Signed-off-by: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Fixes: ea3793ee29
("core: enable more fine-grained datagram reception control")
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e72c932d3f
commit
760a432247
1 changed files with 1 additions and 1 deletions
|
@ -275,7 +275,7 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned int flags,
|
|||
if (skb)
|
||||
return skb;
|
||||
|
||||
if (*err != EAGAIN)
|
||||
if (*err != -EAGAIN)
|
||||
break;
|
||||
} while (timeo &&
|
||||
!__skb_wait_for_more_packets(sk, err, &timeo, last));
|
||||
|
|
Loading…
Reference in a new issue