mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
net/udp: Support zero-length UDP datagrams
According to RFC768 page2 and referring to the Linux implementation, the message with udp length of 0 is supported. Signed-off-by: gaohedong <gaohedong@xiaomi.com>
This commit is contained in:
@@ -103,7 +103,7 @@ void udp_poll(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn)
|
||||
|
||||
/* If the application has data to send, setup the UDP/IP header */
|
||||
|
||||
if (dev->d_sndlen > 0)
|
||||
if (dev->d_len > 0)
|
||||
{
|
||||
udp_send(dev, conn);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user