From 28f5e7e0fe00432a1b37d90295bbe955c98f65e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mi=C5=82osz=20=C5=81agan?= <milosz.lagan@husarion.com>
Date: Wed, 10 Jul 2024 14:31:39 +0200
Subject: [PATCH] Enable LwIP hooks (#190)

* Enable LwIP hook required for Husarnet component

* Enable all LwIP hooks
---
 configs/defconfig.common  | 5 +++++
 configs/defconfig.esp32c6 | 1 -
 configs/defconfig.esp32h2 | 1 -
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/configs/defconfig.common b/configs/defconfig.common
index ec815db35..a05c0732b 100644
--- a/configs/defconfig.common
+++ b/configs/defconfig.common
@@ -70,6 +70,11 @@ CONFIG_LWIP_PPP_SUPPORT=y
 CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT=y
 CONFIG_LWIP_PPP_PAP_SUPPORT=y
 CONFIG_LWIP_PPP_ENABLE_IPV6=n
+CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y
+CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y
+CONFIG_LWIP_HOOK_IP6_SELECT_SRC_ADDR_DEFAULT=y
+CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT=y
+CONFIG_LWIP_HOOK_IP6_INPUT_DEFAULT=y
 CONFIG_MBEDTLS_PSK_MODES=y
 CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
 CONFIG_MBEDTLS_CAMELLIA_C=y
diff --git a/configs/defconfig.esp32c6 b/configs/defconfig.esp32c6
index 4627165c9..e2c9c33ea 100644
--- a/configs/defconfig.esp32c6
+++ b/configs/defconfig.esp32c6
@@ -16,7 +16,6 @@ CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304
 CONFIG_LWIP_IPV6_NUM_ADDRESSES=8
 CONFIG_LWIP_MULTICAST_PING=y
 CONFIG_LWIP_BROADCAST_PING=y
-CONFIG_LWIP_HOOK_IP6_SELECT_SRC_ADDR_CUSTOM=y
 # end of lwip
 
 #
diff --git a/configs/defconfig.esp32h2 b/configs/defconfig.esp32h2
index 63d60eb15..79a13544d 100644
--- a/configs/defconfig.esp32h2
+++ b/configs/defconfig.esp32h2
@@ -12,7 +12,6 @@ CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=2304
 CONFIG_LWIP_IPV6_NUM_ADDRESSES=8
 CONFIG_LWIP_MULTICAST_PING=y
 CONFIG_LWIP_BROADCAST_PING=y
-CONFIG_LWIP_HOOK_IP6_SELECT_SRC_ADDR_CUSTOM=y
 # end of lwip
 
 #