summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2025-08-04 14:51:01 +0200
committerJerome Forissier <jerome.forissier@linaro.org>2025-08-18 15:47:58 +0200
commit90c05f68fcab57d669233033d34e52b8d55d57dd (patch)
tree8b2646b13e02c95428d298bd614ef9e1a7fa47bf /include
parent2cb9fef65bbb7535c1e27cef3122bb0b43e38b68 (diff)
net: lwip: ping: set net_try_count to 1
The legacy network stack sets net_try_count to 1 at the beginning of the net_loop() function. This is required for net_start_again() to work properly. Therefore, set the variable accordingly in the do_ping() function when NET_LWIP=y. This fixes an issue where a ping to an unreachable destination would run twice on the same network device. For example with qemu_arm64_lwip_defconfig: => dhcp DHCP client bound to address 10.0.2.15 (3 ms) => ping 10.0.0.1 Using virtio-net#32 device ping failed; host 10.0.0.1 is not alive Using virtio-net#32 device ping failed; host 10.0.0.1 is not alive => QEMU: Terminated Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/net-lwip.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net-lwip.h b/include/net-lwip.h
index f54f23471f1..e88e2186635 100644
--- a/include/net-lwip.h
+++ b/include/net-lwip.h
@@ -18,6 +18,8 @@ extern size_t cacert_size;
extern enum auth_mode cacert_auth_mode;
extern bool cacert_initialized;
+extern int net_try_count;
+
int set_cacert_builtin(void);
enum proto_t {