Skip to content

Commit

Permalink
Merge branch 'revert-a7dbe5ec' into 'release/v3.1'
Browse files Browse the repository at this point in the history
Revert "Merge branch 'bugfix/fix_addr_changed_when_wifi_disconnect_v3.1' into 'release/v3.1'"

See merge request sdk/ESP8266_RTOS_SDK!1385
  • Loading branch information
donghengqaz committed Apr 27, 2020
2 parents c2ed227 + eaf7f73 commit 61c49cc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/tcpip_adapter/tcpip_adapter_lwip.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ esp_err_t tcpip_adapter_up(tcpip_adapter_if_t tcpip_if)
}

/* use last obtained ip, or static ip */
esp_netif[tcpip_if]->flags |= NETIF_FLAG_UP;
netif_set_addr(esp_netif[tcpip_if], &esp_ip[tcpip_if].ip, &esp_ip[tcpip_if].netmask, &esp_ip[tcpip_if].gw);
netif_set_up(esp_netif[tcpip_if]);
}

tcpip_adapter_update_default_netif();
Expand Down Expand Up @@ -465,7 +466,9 @@ esp_err_t tcpip_adapter_down(tcpip_adapter_if_t tcpip_if)
tcpip_adapter_reset_ip_info(tcpip_if);
}

esp_netif[tcpip_if]->flags &= ~NETIF_FLAG_UP;
netif_set_addr(esp_netif[tcpip_if], IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4);
netif_set_down(esp_netif[tcpip_if]);
tcpip_adapter_start_ip_lost_timer(tcpip_if);
}

tcpip_adapter_update_default_netif();
Expand Down

0 comments on commit 61c49cc

Please sign in to comment.