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

   ### Description / Steps to reproduce the issue
   
   Returned Value:
    *   External port number on success; 0 on failure
   In some cases,when the return value is 0, it may indicate success.
   
   
![Image](https://github.com/user-attachments/assets/02964248-74cb-4426-a93f-a8a5b21fe393)
   
   ipv4_nat_outbound_icmp() use icmp->id as port, but some careless 
applications may send ICMP request packets with icmp->id == 0, in this case, 
nat_port_select() will return a port number of 0, this 0 is a selected result, 
not a failure to find a port. 
   
   
![Image](https://github.com/user-attachments/assets/544ff796-8719-4b68-9afc-dfe9ba1ce64d)
   
   The return value of 0 is interpreted as an error here, preventing subsequent 
processes from proceeding.
   
![Image](https://github.com/user-attachments/assets/8e1288bc-0caa-470c-bd26-2a2dfc2e4734)
   
   ### On which OS does this issue occur?
   
   [OS: Other]
   
   ### What is the version of your OS?
   
   .
   
   ### NuttX Version
   
   all
   
   ### Issue Architecture
   
   [Arch: arm]
   
   ### Issue Area
   
   [Area: Networking]
   
   ### Host information
   
   _No response_
   
   ### 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: commits-unsubscr...@nuttx.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to