lwip/0109-support-udp-recv-zero-packets.patch
2024-02-01 10:30:53 +08:00

26 lines
700 B
Diff

From cbde011450b38359d494bcc18ae91c690e5c5d43 Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Fri, 26 Jan 2024 17:28:29 +0800
Subject: [PATCH] support udp recv zero packets
---
src/api/sockets.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/api/sockets.c b/src/api/sockets.c
index d8b41e4..c133fc2 100644
--- a/src/api/sockets.c
+++ b/src/api/sockets.c
@@ -1385,7 +1385,7 @@ lwip_recvfrom_udp_raw(struct lwip_sock *sock, int flags, struct msghdr *msg, u16
LWIP_UNUSED_ARG(copied);
LWIP_UNUSED_ARG(i);
buflen = do_lwip_read_from_lwip(sock, flags, apiflags);
- if (buflen <= 0) {
+ if (buflen < 0) {
return ERR_BUF;
}
--
2.33.0