mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 06:34:34 +02:00
Merge branch 'bugfix/esp_netif_ip_reconnect' into 'master'
esp_netif: Post IP event for PPP netifs unconditionally Closes IDFGH-8893 and IDFGH-8899 See merge request espressif/esp-idf!21666
This commit is contained in:
@@ -1103,10 +1103,12 @@ static void esp_netif_internal_dhcpc_cb(struct netif *netif)
|
||||
|
||||
if ( !ip4_addr_cmp(ip_2_ip4(&netif->ip_addr), IP4_ADDR_ANY4) ) {
|
||||
|
||||
//check whether IP is changed
|
||||
if ( !ip4_addr_cmp(ip_2_ip4(&netif->ip_addr), (&ip_info->ip)) ||
|
||||
!ip4_addr_cmp(ip_2_ip4(&netif->netmask), (&ip_info->netmask)) ||
|
||||
!ip4_addr_cmp(ip_2_ip4(&netif->gw), (&ip_info->gw)) ) {
|
||||
//check whether IP is changed (or if we're an PPP interface)
|
||||
if ( (!ip4_addr_cmp(ip_2_ip4(&netif->ip_addr), (&ip_info->ip)) ||
|
||||
!ip4_addr_cmp(ip_2_ip4(&netif->netmask), (&ip_info->netmask)) ||
|
||||
!ip4_addr_cmp(ip_2_ip4(&netif->gw), (&ip_info->gw)))
|
||||
// post IP event for PPP interfaces even if IP hasn't changed
|
||||
|| (_IS_NETIF_ANY_POINT2POINT_TYPE(esp_netif))) {
|
||||
ip_event_got_ip_t evt = {
|
||||
.esp_netif = esp_netif,
|
||||
.ip_changed = false,
|
||||
|
Reference in New Issue
Block a user