Closed
Description
ref. esp8266/Arduino#7148 esp8266/Arduino#8317
Current implementation resets default route regardless of it's contents:
esp82xx-nonos-linklayer/glue-lwip/lwip-git.c
Lines 322 to 326 in 18975ca
But, it does respect un-setting it:
esp82xx-nonos-linklayer/glue-lwip/lwip-git.c
Lines 525 to 526 in 18975ca
Should it respect the already-set netif?
diff --git a/glue-lwip/lwip-git.c b/glue-lwip/lwip-git.c
index 4cf133f..b3afc4d 100644
--- a/glue-lwip/lwip-git.c
+++ b/glue-lwip/lwip-git.c
@@ -322,8 +322,10 @@ static void netif_sta_status_callback (struct netif* netif)
if ( netif->flags & NETIF_FLAG_UP
&& netif == netif_sta)
{
- // this is our default route
- netif_set_default(netif);
+ // this is our default route, but only when there is nothing else
+ if (netif_default == NULL) {
+ netif_set_default(netif);
+ }
// If we have a valid address of any type restart SNTP
bool valid_address = ip_2_ip4(&netif->ip_addr)->addr;
If yes, Core's Lwip class also needs a patch of the same nature
Metadata
Metadata
Assignees
Labels
No labels