Merge branch 'bugfix/lwip_loopback' into 'master'
fix(lwip): fix tcp connect fail when enable LOOPIF when enable the LOOPIF, because of use the loopnetif, the TCP connect will fail. see TW12029 See merge request !711
This commit is contained in:
commit
195358ddb7
1 changed files with 7 additions and 0 deletions
|
@ -147,6 +147,9 @@ ip4_route(const ip4_addr_t *dest)
|
||||||
{
|
{
|
||||||
#if ESP_LWIP
|
#if ESP_LWIP
|
||||||
struct netif *non_default_netif = NULL;
|
struct netif *non_default_netif = NULL;
|
||||||
|
#if LWIP_HAVE_LOOPIF
|
||||||
|
struct netif *loop_default_netif = netif_find("lo0");
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
struct netif *netif;
|
struct netif *netif;
|
||||||
|
|
||||||
|
@ -173,7 +176,11 @@ ip4_route(const ip4_addr_t *dest)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (netif != netif_default){
|
if (netif != netif_default){
|
||||||
|
#if LWIP_HAVE_LOOPIF
|
||||||
|
non_default_netif = (netif == loop_default_netif) ? NULL : netif;
|
||||||
|
#else
|
||||||
non_default_netif = netif;
|
non_default_netif = netif;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue