mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 03:16:18 +00:00
autoip: fix 'autoip_remove_struct()' after changing storage to 'netif_client_data'
Reported-by: Amena El Homsi <amena.elhomsi@gmail.com> Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
parent
79cd89f99d
commit
03998f5147
@ -109,6 +109,23 @@ autoip_set_struct(struct netif *netif, struct autoip *autoip)
|
|||||||
netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, autoip);
|
netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, autoip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup autoip
|
||||||
|
* Remove a struct autoip previously set to the netif using autoip_set_struct()
|
||||||
|
*
|
||||||
|
* @param netif the netif for which to set the struct autoip
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
autoip_remove_struct(struct netif *netif)
|
||||||
|
{
|
||||||
|
LWIP_ASSERT_CORE_LOCKED();
|
||||||
|
LWIP_ASSERT("netif != NULL", netif != NULL);
|
||||||
|
LWIP_ASSERT("netif has no struct autoip set",
|
||||||
|
netif_autoip_data(netif) != NULL);
|
||||||
|
|
||||||
|
netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_AUTOIP, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/** Restart AutoIP client and check the next address (conflict detected)
|
/** Restart AutoIP client and check the next address (conflict detected)
|
||||||
*
|
*
|
||||||
* @param netif The netif under AutoIP control
|
* @param netif The netif under AutoIP control
|
||||||
|
@ -69,8 +69,7 @@ struct autoip
|
|||||||
|
|
||||||
|
|
||||||
void autoip_set_struct(struct netif *netif, struct autoip *autoip);
|
void autoip_set_struct(struct netif *netif, struct autoip *autoip);
|
||||||
/** Remove a struct autoip previously set to the netif using autoip_set_struct() */
|
void autoip_remove_struct(struct netif *netif);
|
||||||
#define autoip_remove_struct(netif) do { (netif)->autoip = NULL; } while (0)
|
|
||||||
err_t autoip_start(struct netif *netif);
|
err_t autoip_start(struct netif *netif);
|
||||||
err_t autoip_stop(struct netif *netif);
|
err_t autoip_stop(struct netif *netif);
|
||||||
void autoip_network_changed_link_up(struct netif *netif);
|
void autoip_network_changed_link_up(struct netif *netif);
|
||||||
|
Loading…
Reference in New Issue
Block a user