From 15651b5923b61f4e113db1790f3d9a4e5fb73cdb Mon Sep 17 00:00:00 2001 From: XiaXiaotian Date: Mon, 26 Dec 2016 15:47:20 +0800 Subject: [PATCH] lwip: add ip frag and reassembly option in menuconfig --- components/lwip/Kconfig | 13 +++++++++++++ components/lwip/include/lwip/port/lwipopts.h | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index 2e7e31a8a..9e2b03167 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -49,6 +49,19 @@ config LWIP_DHCP_MAX_NTP_SERVERS First argument of sntp_setserver/sntp_setservername functions is limited to this value. +config LWIP_IP_FRAG + bool "Enable fragment outgoing IP packets" + default 0 + help + Enabling this option allows fragmenting outgoing IP packets if their size + exceeds MTU. + +config LWIP_IP_REASSEMBLY + bool "Enable reassembly incoming fragmented IP packets" + default 0 + help + Enabling this option allows reassemblying incoming fragmented IP packets. + endmenu diff --git a/components/lwip/include/lwip/port/lwipopts.h b/components/lwip/include/lwip/port/lwipopts.h index 8612eb11b..5000d63ba 100755 --- a/components/lwip/include/lwip/port/lwipopts.h +++ b/components/lwip/include/lwip/port/lwipopts.h @@ -154,14 +154,14 @@ * this option does not affect outgoing packet sizes, which can be controlled * via IP_FRAG. */ -#define IP_REASSEMBLY 0 +#define IP_REASSEMBLY CONFIG_LWIP_IP_REASSEMBLY /** * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note * that this option does not affect incoming packet sizes, which can be * controlled via IP_REASSEMBLY. */ -#define IP_FRAG 0 +#define IP_FRAG CONFIG_LWIP_IP_FRAG /** * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally)