netif: add IPV4_ADDR_VALID ext status callback reason

This ext-callback reason is always issued when an IPv4 config
has been set, even if it has not changed (e.g. DHCP reboot)

See bug #55121
This commit is contained in:
Simon Goldschmidt
2020-01-12 20:30:22 +01:00
parent bb31fbd737
commit 8a8058a436
2 changed files with 8 additions and 0 deletions

View File

@@ -739,6 +739,12 @@ netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t *
#if LWIP_NETIF_EXT_STATUS_CALLBACK
if (change_reason != LWIP_NSC_NONE) {
change_reason |= LWIP_NSC_IPV4_SETTINGS_CHANGED;
}
if (!remove) {
/* Isssue a callback even if the address hasn't changed, eg. DHCP reboot */
change_reason |= LWIP_NSC_IPV4_ADDR_VALID;
}
if (change_reason != LWIP_NSC_NONE) {
netif_invoke_ext_callback(netif, change_reason, &cb_args);
}
#endif