liamHowatt opened a new issue, #17758:
URL: https://github.com/apache/nuttx/issues/17758

   ### Description / Steps to reproduce the issue
   
   It's related to UDP changes.
   
   https://github.com/apache/nuttx/pull/17699#issuecomment-3699381467
   
   > `sim:userfs` defconfig.
   > 
   > ```
   > nsh> userfs
   > nsh> ls mnt/ufstest
   > ```
   > 
   > It gets stuck.
   > 
   > I could fix it with this change.
   > 
   > ```diff
   > diff --git a/net/udp/udp_devpoll.c b/net/udp/udp_devpoll.c
   > index 4ff4994c4e..e35bc78934 100644
   > --- a/net/udp/udp_devpoll.c
   > +++ b/net/udp/udp_devpoll.c
   > @@ -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_len > 0)
   > +      if (dev->d_sndlen > 0)
   >          {
   >            udp_send(dev, conn);
   >            return;
   > diff --git a/net/udp/udp_send.c b/net/udp/udp_send.c
   > index 8b59be7fb2..f4f4539f99 100644
   > --- a/net/udp/udp_send.c
   > +++ b/net/udp/udp_send.c
   > @@ -155,7 +155,7 @@ void udp_send(FAR struct net_driver_s *dev, FAR struct 
udp_conn_s *conn)
   >  
   >    ninfo("UDP payload: %d (%d) bytes\n", dev->d_sndlen, dev->d_len);
   >  
   > -  if (dev->d_len > 0)
   > +  if (dev->d_sndlen > 0)
   >      {
   >  #ifdef CONFIG_NET_IPv4
   >  #ifdef CONFIG_NET_IPv6
   > ```
   > 
   > devif_send.c sets `d_sndlen` while `d_len` remains 0.
   > 
   > 
https://github.com/apache/nuttx/blob/0625b7a760c4c21f872dae823c7eb3dc7c345d7a/net/devif/devif_send.c#L116
   > 
   > Is devif_send.c wrong for setting `d_sndlen` instead of `d_len`?
   
   ### On which OS does this issue occur?
   
   [OS: Linux]
   
   ### What is the version of your OS?
   
   Ubuntu 22.04
   
   ### NuttX Version
   
   4d525505e47585419dcc0f5fd3b0c6a40f073d10
   
   ### Issue Architecture
   
   [Arch: simulator]
   
   ### Issue Area
   
   [Area: Networking]
   
   ### Host information
   
   NuttX sim on x86-64 Linux Ubuntu 22.04 Docker container.
   
   ### Verification
   
   - [x] I have verified before submitting the report.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to