mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-27 15:16:03 +00:00
bug #52893: Add 'old_stat' save in LWIP_NSC_IPV6_ADDR_STATE_CHANGED callback message
This commit is contained in:
parent
fe2c249fb7
commit
6606c4013f
@ -1404,17 +1404,17 @@ netif_ip6_addr_set_state(struct netif *netif, s8_t addr_idx, u8_t state)
|
|||||||
/* address state has changed -> call the callback function */
|
/* address state has changed -> call the callback function */
|
||||||
NETIF_STATUS_CALLBACK(netif);
|
NETIF_STATUS_CALLBACK(netif);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#if LWIP_NETIF_EXT_STATUS_CALLBACK
|
#if LWIP_NETIF_EXT_STATUS_CALLBACK
|
||||||
{
|
{
|
||||||
netif_ext_callback_args_t args;
|
netif_ext_callback_args_t args;
|
||||||
args.ipv6_addr_state_changed.addr_index = addr_idx;
|
args.ipv6_addr_state_changed.addr_index = addr_idx;
|
||||||
args.ipv6_addr_state_changed.address = netif_ip_addr6(netif, addr_idx);
|
args.ipv6_addr_state_changed.old_state = old_state;
|
||||||
netif_invoke_ext_callback(netif, LWIP_NSC_IPV6_ADDR_STATE_CHANGED, &args);
|
args.ipv6_addr_state_changed.address = netif_ip_addr6(netif, addr_idx);
|
||||||
}
|
netif_invoke_ext_callback(netif, LWIP_NSC_IPV6_ADDR_STATE_CHANGED, &args);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: IPv6 address %d of interface %c%c set to %s/0x%"X8_F"\n",
|
LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("netif: IPv6 address %d of interface %c%c set to %s/0x%"X8_F"\n",
|
||||||
addr_idx, netif->name[0], netif->name[1], ip6addr_ntoa(netif_ip6_addr(netif, addr_idx)),
|
addr_idx, netif->name[0], netif->name[1], ip6addr_ntoa(netif_ip6_addr(netif, addr_idx)),
|
||||||
netif_ip6_addr_state(netif, addr_idx)));
|
netif_ip6_addr_state(netif, addr_idx)));
|
||||||
|
@ -598,6 +598,8 @@ typedef union
|
|||||||
{
|
{
|
||||||
/** Index of affected IPv6 address */
|
/** Index of affected IPv6 address */
|
||||||
s8_t addr_index;
|
s8_t addr_index;
|
||||||
|
/** Old IPv6 address state */
|
||||||
|
u8_t old_state;
|
||||||
/** Affected IPv6 address */
|
/** Affected IPv6 address */
|
||||||
const ip_addr_t* address;
|
const ip_addr_t* address;
|
||||||
} ipv6_addr_state_changed;
|
} ipv6_addr_state_changed;
|
||||||
|
Loading…
Reference in New Issue
Block a user