Skip to content

Commit a202bfe

Browse files
freakyxueespressif-bot
authored andcommitted
fix bug for ipv6 fragment
1 parent 8912462 commit a202bfe

File tree

3 files changed

+38
-11
lines changed

3 files changed

+38
-11
lines changed

components/lwip/Kconfig

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,31 @@ menu "LWIP"
123123
Enabling this option allows checking for the destination address
124124
of a received IPv4 Packet.
125125

126-
config LWIP_IP_FRAG
127-
bool "Enable fragment outgoing IP packets"
126+
config LWIP_IP4_FRAG
127+
bool "Enable fragment outgoing IP4 packets"
128128
default y
129129
help
130-
Enabling this option allows fragmenting outgoing IP packets if their size
130+
Enabling this option allows fragmenting outgoing IP4 packets if their size
131131
exceeds MTU.
132132

133-
config LWIP_IP_REASSEMBLY
134-
bool "Enable reassembly incoming fragmented IP packets"
133+
config LWIP_IP6_FRAG
134+
bool "Enable fragment outgoing IP6 packets"
135+
default y
136+
help
137+
Enabling this option allows fragmenting outgoing IP6 packets if their size
138+
exceeds MTU.
139+
140+
config LWIP_IP4_REASSEMBLY
141+
bool "Enable reassembly incoming fragmented IP4 packets"
142+
default n
143+
help
144+
Enabling this option allows reassemblying incoming fragmented IP4 packets.
145+
146+
config LWIP_IP6_REASSEMBLY
147+
bool "Enable reassembly incoming fragmented IP6 packets"
135148
default n
136149
help
137-
Enabling this option allows reassemblying incoming fragmented IP packets.
150+
Enabling this option allows reassemblying incoming fragmented IP6 packets.
138151

139152
config LWIP_IP_FORWARD
140153
bool "Enable IP forwarding"

components/lwip/lwip

components/lwip/port/esp32/include/lwipopts.h

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,32 @@
157157
--------------------------------
158158
*/
159159
/**
160-
* IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that
160+
* IP_REASSEMBLY==1: Reassemble incoming fragmented IP4 packets. Note that
161161
* this option does not affect outgoing packet sizes, which can be controlled
162162
* via IP_FRAG.
163163
*/
164-
#define IP_REASSEMBLY CONFIG_LWIP_IP_REASSEMBLY
164+
#define IP_REASSEMBLY CONFIG_LWIP_IP4_REASSEMBLY
165165

166166
/**
167-
* IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note
167+
* LWIP_IPV6_REASS==1: reassemble incoming IP6 packets that fragmented. Note that
168+
* this option does not affect outgoing packet sizes, which can be controlled
169+
* via LWIP_IPV6_FRAG.
170+
*/
171+
#define LWIP_IPV6_REASS CONFIG_LWIP_IP6_REASSEMBLY
172+
173+
/**
174+
* IP_FRAG==1: Fragment outgoing IP4 packets if their size exceeds MTU. Note
175+
* that this option does not affect incoming packet sizes, which can be
176+
* controlled via IP_REASSEMBLY.
177+
*/
178+
#define IP_FRAG CONFIG_LWIP_IP4_FRAG
179+
180+
/**
181+
* LWIP_IPV6_FRAG==1: Fragment outgoing IP6 packets if their size exceeds MTU. Note
168182
* that this option does not affect incoming packet sizes, which can be
169183
* controlled via IP_REASSEMBLY.
170184
*/
171-
#define IP_FRAG CONFIG_LWIP_IP_FRAG
185+
#define LWIP_IPV6_FRAG CONFIG_LWIP_IP6_FRAG
172186

173187
/**
174188
* IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally)

0 commit comments

Comments
 (0)