|
From: | Axel Lin |
Subject: | Re: [lwip-devel] LWIP_NSC_IPV4_GATEWAY/NETMASK/SETTINGS_CHANGED should check if the setting is actually being changed |
Date: | Sun, 19 Mar 2017 13:14:50 +0800 |
2017-03-18 17:24 GMT+08:00 address@hidden <address@hidden>: > You're probably right. Would you mind adding a bug so that this doesn't get > forgotten? > > Simon > > > Axel Lin wrote: >> >> Currently seems only LWIP_NSC_IPV4_ADDRESS_CHANGED check if the >> setting is actually being changed. >> >> When enable LWIP_NETIF_EXT_STATUS_CALLBACK: >> I got below event everytime when dhcp server re-assigned ip address even >> the >> gateway/netmask/ip are exactly the same with previous setting. >> >> LWIP_NSC_IPV4_GATEWAY_CHANGED >> LWIP_NSC_IPV4_NETMASK_CHANGED >> LWIP_NSC_IPV4_SETTINGS_CHANGED >> >> I'm wondering if these callbacks should be called only when the >> setting is actually being changed. I applied Dirk's fix and run the test: Initially (after boot): [10:06:13:752] netif: netmask of interface wl set to 255.255.255.0␍␊ [10:06:13:756] netif: GW address of interface wl set to 192.168.0.1␍␊ [10:06:13:761] netif_set_ipaddr: netif address being changed␍␊ [10:06:13:765] netif: IP address of interface wl set to 192.168.0.100␍ But sometimes I got: [11:04:02:981] netif: IP address of interface wl set to 192.168.0.100␍␊ [11:26:38:284] netif_set_ipaddr: netif address being changed␍␊ [11:26:38:293] netif: IP address of interface wl set to 0.0.0.0␍␊ [11:26:38:293] netif: netmask of interface wl set to 0.0.0.0␍␊ [11:26:38:298] netif: GW address of interface wl set to 0.0.0.0␍
[Prev in Thread] | Current Thread | [Next in Thread] |