zs39 opened a new pull request, #3301: URL: https://github.com/apache/nuttx-apps/pull/3301
## Summary Before attempting to sample via NTP, network connectivity should be checked to avoid frequent sampling that could cause network error logs to overflow. ## Impact It will affect NTP functionality. ## Testing With both CONFIG_DEBUG_NET_ERROR and CONFIG_NETUTILS_NTPCLIENT configuration options enabled and the network disconnected, error logs will flood the screen. ``` nsh> arp_send: ERROR: arp_wait failed: -110, ipaddr: [10.0.1.1](http://10.0.1.1/) arp_send: ERROR: arp_wait failed: -110, ipaddr: [10.0.1.1](http://10.0.1.1/) arp_send: ERROR: arp_wait failed: -110, ipaddr: [10.0.1.1](http://10.0.1.1/) arp_send: ERROR: arp_wait failed: -110, ipaddr: [10.0.1.1](http://10.0.1.1/) psock_udp_sendto: ERROR: Not reachable dns_send_query: ERROR: sendto failed: -101 dns_query_error: ERROR: IPv6 dns_send_query failed: -101, server address: [119.29.29.29](http://119.29.29.29/) psock_udp_sendto: ERROR: Not reachable dns_send_query: ERROR: sendto failed: -101 dns_query_error: ERROR: IPv4 dns_send_query failed: -101, server address: [119.29.29.29](http://119.29.29.29/) ntp_gethostip_multi: ERROR: getaddrinfo([0.pool.ntp.org](http://0.pool.ntp.org/)): 1: EAI_AGAIN ntpc_get_ntp_sample: ERROR: ntp_get_next_hostip() failed: 101 psock_udp_sendto: ERROR: Not reachable dns_send_query: ERROR: sendto failed: -101 dns_query_error: ERROR: IPv6 dns_send_query failed: -101, server address: [119.29.29.29](http://119.29.29.29/) psock_udp_sendto: ERROR: Not reachable dns_send_query: ERROR: sendto failed: -101 dns_query_error: ERROR: IPv4 dns_send_query failed: -101, server address: [119.29.29.29](http://119.29.29.29/) ntp_gethostip_multi: ERROR: getaddrinfo([1.pool.ntp.org](http://1.pool.ntp.org/)): 1: EAI_AGAIN ntpc_get_ntp_sample: ERROR: ntp_get_next_hostip() failed: 101 psock_udp_sendto: ERROR: Not reachable dns_send_query: ERROR: sendto failed: -101 dns_query_error: ERROR: IPv6 dns_send_query failed: -101, server address: [119.29.29.29](http://119.29.29.29/) psock_udp_sendto: ERROR: Not reachable dns_send_query: ERROR: sendto failed: -101 dns_query_error: ERROR: IPv4 dns_send_query failed: -101, server address: [119.29.29.29](http://119.29.29.29/) ntp_gethostip_multi: ERROR: getaddrinfo([2.pool.ntp.org](http://2.pool.ntp.org/)): 1: EAI_AGAIN ntpc_get_ntp_sample: ERROR: ntp_get_next_hostip() failed: 101 ``` Only a small amount of error log is printed after adding the patch. ``` nsh> arp_send: ERROR: arp_wait failed: -110, ipaddr: [10.0.1.1](http://10.0.1.1/) arp_send: ERROR: arp_wait failed: -110, ipaddr: [10.0.1.1](http://10.0.1.1/) arp_send: ERROR: arp_wait failed: -110, ipaddr: [10.0.1.1](http://10.0.1.1/) arp_send: ERROR: arp_wait failed: -110, ipaddr: [10.0.1.1](http://10.0.1.1/) icmp_sendmsg: ERROR: Not reachable icmp_sendmsg: ERROR: Not reachable icmp_sendmsg: ERROR: Not reachable icmp_sendmsg: ERROR: Not reachable ``` -- 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]
