mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-06-05 21:04:45 +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 <martin.valik@mail.com> (espressif/esp-lwip@3b88e84f) Ref IDF-4817
This commit is contained in:
@@ -795,6 +795,12 @@ dhcp_start(struct netif *netif)
|
||||
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 */
|
||||
result = dhcp_discover(netif);
|
||||
if (result != ERR_OK) {
|
||||
|
||||
Reference in New Issue
Block a user