This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit f89773cbc8ed658461223c923b7fdc1c99c18d00
Author: wangchen <[email protected]>
AuthorDate: Tue Mar 25 10:28:05 2025 +0800

    ping: Initialize info.devname to NULL
    
    Initialize info.devname to NULL to solve the problem of the SO-BINDTODEVICE 
property being set incorrectly in the icmp_ping function
    
    Signed-off-by: wangchen <[email protected]>
---
 system/ping/ping.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/system/ping/ping.c b/system/ping/ping.c
index 1abee622a..f294983a1 100644
--- a/system/ping/ping.c
+++ b/system/ping/ping.c
@@ -296,6 +296,9 @@ int main(int argc, FAR char *argv[])
   info.delay     = ICMP_POLL_DELAY;
   info.timeout   = ICMP_POLL_DELAY;
   info.callback  = ping_result;
+#ifdef CONFIG_NET_BINDTODEVICE
+  info.devname   = NULL;
+#endif
   info.priv      = &priv;
   priv.code      = ICMP_I_OK;
   priv.tmin      = LONG_MAX;

Reply via email to