patch-2.4.26 linux-2.4.26/net/ipv4/udp.c

Next file: linux-2.4.26/net/ipv6/exthdrs.c
Previous file: linux-2.4.26/net/ipv4/tcp_ipv4.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.25/net/ipv4/udp.c linux-2.4.26/net/ipv4/udp.c
@@ -657,6 +657,7 @@
 	if (flags & MSG_ERRQUEUE)
 		return ip_recv_error(sk, msg, len);
 
+try_again:
 	skb = skb_recv_datagram(sk, flags, noblock, &err);
 	if (!skb)
 		goto out;
@@ -722,7 +723,9 @@
 
 	skb_free_datagram(sk, skb);
 
-	return -EAGAIN;	
+	if (noblock)
+		return -EAGAIN;	
+	goto try_again;
 }
 
 int udp_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)