mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-09-11 19:50:06 +00:00
dhcp: Add post_init hook to allow skip discovery
This enables embedded devices restart the DHCP state machine easily after reset and continue directly with DHCP_BIND of previously bound address. Co-Authored-By: MartinValik <[email protected]> (espressif/esp-lwip@3b88e84f) Ref IDF-4817
This commit is contained in:
@@ -795,6 +795,12 @@ dhcp_start(struct netif *netif)
|
|||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LWIP_HOOK_DHCP_POST_INIT
|
||||||
|
if (LWIP_HOOK_DHCP_POST_INIT(netif, result)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* (re)start the DHCP negotiation */
|
/* (re)start the DHCP negotiation */
|
||||||
result = dhcp_discover(netif);
|
result = dhcp_discover(netif);
|
||||||
if (result != ERR_OK) {
|
if (result != ERR_OK) {
|
||||||
|
|||||||
Reference in New Issue
Block a user