From 872272e23a74a34baa5ade8b5fbc132f6e4d8daa Mon Sep 17 00:00:00 2001 From: Francesco Giancane Date: Mon, 17 Feb 2020 12:33:37 +0100 Subject: [PATCH] lwip: make IPV6 link-local support over PPP configurable Make the link local negotiation for IPV6 in PPP optional and configurable. This is because some modems do not support the IPV6 negotiation and sending IPV6CP frames would in some cases break the network configuration phase, resulting in a timeout during the Phase Network. Please note that this does not disable the IPV6 support for the outgoing communication (IPV6 is still enabled even if this option is not selected) but just for the local link between lwIP and modem. Signed-off-by: Francesco Giancane Merges https://github.com/espressif/esp-idf/pull/4782 Closes https://github.com/espressif/esp-idf/issues/1065 --- components/lwip/Kconfig | 11 +++++++++++ components/lwip/port/esp32/include/lwipopts.h | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 12b8e16d4..1d8be501d 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -543,6 +543,17 @@ menu "LWIP" PPP over serial support is experimental and unsupported. + config LWIP_PPP_ENABLE_IPV6 + bool "Enable IPV6 support for PPP connections (IPV6CP)" + depends on LWIP_PPP_SUPPORT + default y + help + Enable IPV6 support in PPP for the local link between the DTE (processor) and DCE (modem). + There are some modems which do not support the IPV6 addressing in the local link. + If they are requested for IPV6CP negotiation, they may time out. + This would in turn fail the configuration for the whole link. + If your modem is not responding correctly to PPP Phase Network, try to disable IPV6 support. + config LWIP_PPP_NOTIFY_PHASE_SUPPORT bool "Enable Notify Phase Callback" depends on LWIP_PPP_SUPPORT diff --git a/components/lwip/port/esp32/include/lwipopts.h b/components/lwip/port/esp32/include/lwipopts.h index 3475f2986..d6aa757f0 100644 --- a/components/lwip/port/esp32/include/lwipopts.h +++ b/components/lwip/port/esp32/include/lwipopts.h @@ -611,6 +611,14 @@ #if PPP_SUPPORT +/** + * PPP_IPV6_SUPPORT == 1: Enable IPV6 support for local link + * between modem and lwIP stack. + * Some modems do not support IPV6 addressing in local link and + * the only option available is to disable IPV6 address negotiation. + */ +#define PPP_IPV6_SUPPORT CONFIG_LWIP_PPP_ENABLE_IPV6 + /** * PPP_NOTIFY_PHASE==1: Support PPP notify phase. */