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

   ## Summary
   Refactor netlib_check_ipconnectivity() to use gateway/router ping instead of 
DNS server ping for network connectivity checks. Add IPv6 support.
   
   ## Impact
   - When ip is NULL, ping the default gateway of each interface (via 
getifaddrs) instead of the hardcoded DNS server address
   - Add IPv6 ping support (icmpv6_ping) alongside existing IPv4 ping
   - Add routing table fallback: ping routers from /proc/net/route and 
/proc/net/ipv6route when gateway ping fails
   - For point-to-point/tunnel interfaces (no ARP), treat as reachable directly
   - When ping is disabled at build time, fall back to checking network card 
status instead of always returning 1
   - Auto-detect IPv4/IPv6 when a specific IP is provided
   - netlib_checkipconnectivity.c no longer depends on CONFIG_NETUTILS_PING to 
compile
   - Improve doxygen-style comments in netlib.h; fix typo "nagtive" → "negative"
   
   ## Testing
   - Build tested with combinations of CONFIG_NETUTILS_PING, 
CONFIG_NETUTILS_PING6, CONFIG_NETDEV_IFINDEX, and HAVE_ROUTE_PROCFS 
enabled/disabled
   - Verified ntpclient caller (netlib_check_ipconnectivity(NULL, 1, 1)) works 
correctly with the new gateway ping logic
   - Tested on board with IPv4-only, IPv6-only, and dual-stack network 
interfaces
   - Verified fallback path when ping is disabled at build time
   
   
   


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