summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/lwip/ping.c1
-rw-r--r--include/net-lwip.h2
-rw-r--r--net/lwip/net-lwip.c2
3 files changed, 4 insertions, 1 deletions
diff --git a/cmd/lwip/ping.c b/cmd/lwip/ping.c
index 87f8e958e48..6d090fc530d 100644
--- a/cmd/lwip/ping.c
+++ b/cmd/lwip/ping.c
@@ -170,6 +170,7 @@ int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
if (net_lwip_dns_resolve(argv[1], &addr))
return CMD_RET_USAGE;
+ net_try_count = 1;
restart:
if (net_lwip_eth_start() < 0 || ping_loop(eth_get_dev(), &addr) < 0) {
if (net_start_again() == 0)
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 {
diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c
index 74cbc7e4bf5..1a70cedfb58 100644
--- a/net/lwip/net-lwip.c
+++ b/net/lwip/net-lwip.c
@@ -27,7 +27,7 @@
#if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER)
void (*push_packet)(void *, int len) = 0;
#endif
-static int net_try_count;
+int net_try_count;
static int net_restarted;
int net_restart_wrap;
static uchar net_pkt_buf[(PKTBUFSRX) * PKTSIZE_ALIGN + PKTALIGN];