mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-30 12:32:37 +00:00
netif: more ip6 state changes invoke status callback
For applications that use NETIF_STATUS_CALLBACK to help keep track of extra per-address shadow state of IPv6 addresses, even in the light of autogenerated addresses (which may "spontaneously" appear/disappear), state transitions between tentative, duplicated, and invalid are important as well. Therefore, invoke the status callback for all such state transitions. Continue to filter out state changes between various levels of progress of the tentative state, though.
This commit is contained in:
parent
d99334573b
commit
901664eca1
@ -1127,9 +1127,9 @@ netif_ip6_addr_set_state(struct netif* netif, s8_t addr_idx, u8_t state)
|
||||
/* @todo: add mib2 ip6 entries? */
|
||||
netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV6);
|
||||
}
|
||||
if ((old_state & IP6_ADDR_PREFERRED) != (state & IP6_ADDR_PREFERRED)) {
|
||||
/* address state has changed (valid flag changed or switched between
|
||||
preferred and deprecated) -> call the callback function */
|
||||
if ((old_state & ~IP6_ADDR_TENTATIVE_COUNT_MASK) !=
|
||||
(state & ~IP6_ADDR_TENTATIVE_COUNT_MASK)) {
|
||||
/* address state has changed -> call the callback function */
|
||||
NETIF_STATUS_CALLBACK(netif);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user