From 501a25f0c724ad3179f35ed97efe75ca4152828d Mon Sep 17 00:00:00 2001 From: David Cermak Date: Mon, 8 Jan 2024 09:42:29 +0100 Subject: [PATCH] feat(lwip): Added PPP config option to control VJ header compression --- components/lwip/Kconfig | 10 ++++++++++ components/lwip/port/include/lwipopts.h | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 0431b74cd8..59843d1646 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -959,6 +959,16 @@ menu "LWIP" help Enable to use PPP server + config LWIP_PPP_VJ_HEADER_COMPRESSION + bool "Enable VJ IP Header compression" + depends on LWIP_PPP_SUPPORT + default y + help + Enable support for VJ header compression. + Please disable this if you're using NAPT on PPP interface, + since the compressed IP header might not be correctly interpreted + in NAT causing the compressed packet to be dropped. + config LWIP_ENABLE_LCP_ECHO bool "Enable LCP ECHO" depends on LWIP_PPP_SUPPORT diff --git a/components/lwip/port/include/lwipopts.h b/components/lwip/port/include/lwipopts.h index c633c1a5bc..811c2707f0 100644 --- a/components/lwip/port/include/lwipopts.h +++ b/components/lwip/port/include/lwipopts.h @@ -1110,6 +1110,11 @@ static inline uint32_t timeout_from_offered(uint32_t lease, uint32_t min) */ #define PPP_SERVER CONFIG_LWIP_PPP_SERVER_SUPPORT +/** + * VJ_SUPPORT==1: Support VJ header compression. + */ +#define VJ_SUPPORT CONFIG_LWIP_PPP_VJ_HEADER_COMPRESSION + /** * PPP_MAXIDLEFLAG: Max Xmit idle time (in ms) before resend flag char. * TODO: If PPP_MAXIDLEFLAG > 0 and next package is send during PPP_MAXIDLEFLAG time,