Skip to content

Commit

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

This reverts merge request !1375
  • Loading branch information
donghengqaz committed Apr 27, 2020
1 parent c2ed227 commit eaf7f73
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 eaf7f73

Please sign in to comment.