13627105546 opened a new pull request, #3316:
URL: https://github.com/apache/nuttx-apps/pull/3316

   
   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   - Why : When using icmp_ping , there is no filter set for the socket. This 
might cause the socket to receive unwanted ICMP packets or fail to filter out 
packets that are not Echo Replies, potentially interfering with the ping logic 
or causing performance issues in noisy network environments.
   - What : This commit adds logic to set the ICMP_FILTER socket option for the 
ping socket. It introduces a macro ICMP_SET_FILTER and uses setsockopt to 
configure the filter to only allow ICMP_ECHO_REPLY packets, blocking all other 
ICMP types.
   
   ## Impact
   
   - Users : Users of the ping command will experience more robust behavior as 
the socket will only process relevant ICMP Echo Reply packets.
   - Build : No impact on build configuration.
   - Hardware : No specific hardware dependency. Depends on the TCP/IP stack 
implementation of ICMP_FILTER socket option.
   - Compatibility : Backward compatible.
   
   ## Testing
   
   - Verification :
   - Verified that the code compiles successfully.
   - Verified that checkpatch.sh passes for the modified files.
   - Target : Verified on local hardware platform.
   
   
   


-- 
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