From d54c9476288f374f0d1cf38f9f89527a79141a9f Mon Sep 17 00:00:00 2001 From: Xue yun fei Date: Thu, 11 Jan 2024 14:35:36 +0800 Subject: [PATCH] Fix(lwip):bugfix for change default value for ip ttl --- components/lwip/Kconfig | 7 +++++++ components/lwip/port/esp32/include/lwipopts.h | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 14e3d48464..7bbd2165fd 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -168,6 +168,13 @@ menu "LWIP" Enabling this option allows checking for the destination address of a received IPv4 Packet. + config LWIP_IP_DEFAULT_TTL + int "The value for Time-To-Live used by transport layers" + range 1 255 + default 64 + help + Set value for Time-To-Live used by transport layers. + config LWIP_IP4_FRAG bool "Enable fragment outgoing IP4 packets" default y diff --git a/components/lwip/port/esp32/include/lwipopts.h b/components/lwip/port/esp32/include/lwipopts.h index bbfc8bc8eb..ece4fe337d 100644 --- a/components/lwip/port/esp32/include/lwipopts.h +++ b/components/lwip/port/esp32/include/lwipopts.h @@ -210,6 +210,11 @@ extern "C" */ #define IP_REASS_MAX_PBUFS 10 +/** + * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers. + */ +#define IP_DEFAULT_TTL CONFIG_LWIP_IP_DEFAULT_TTL + /** * IP_FORWARD==1: Enables the ability to forward IP packets across network * interfaces. If you are going to run lwIP on a device with only one network