From 0d238cb76a0f1ec9b96eb42f2da1012a35defae5 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Wed, 23 Mar 2022 13:09:03 +0100 Subject: [PATCH] dhcp: Add post_init hook to allow skip discovery 2.1.3-esp: 14bba8e3 dhcp: Add post_init hook to allow skip discovery Co-Authored-By: MartinValik (espressif/esp-lwip@3b88e84f) --- src/core/ipv4/dhcp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/ipv4/dhcp.c b/src/core/ipv4/dhcp.c index d9ed8b0f..b37b25a6 100644 --- a/src/core/ipv4/dhcp.c +++ b/src/core/ipv4/dhcp.c @@ -870,6 +870,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) {