Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102738243
D35872.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
664 B
Referenced Files
None
Subscribers
None
D35872.diff
View Options
diff --git a/sys/netipsec/ipsec_input.c b/sys/netipsec/ipsec_input.c
--- a/sys/netipsec/ipsec_input.c
+++ b/sys/netipsec/ipsec_input.c
@@ -276,6 +276,7 @@
struct icmp *icp;
struct ip *ip = v;
uint32_t pmtu, spi;
+ uint32_t max_pmtu;
uint8_t proto;
if (code != PRC_MSGSIZE || ip == NULL)
@@ -304,7 +305,15 @@
memset(&inc, 0, sizeof(inc));
inc.inc_faddr = satosin(sa)->sin_addr;
- tcp_hc_updatemtu(&inc, pmtu);
+
+ /* Update pmtu only if its smaller than the current one. */
+ max_pmtu = tcp_hc_getmtu(&inc);
+ if (max_pmtu == 0)
+ max_pmtu = tcp_maxmtu(&inc, NULL);
+
+ if (pmtu < max_pmtu)
+ tcp_hc_updatemtu(&inc, pmtu);
+
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 1:31 PM (21 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14678970
Default Alt Text
D35872.diff (664 B)
Attached To
Mode
D35872: ipsec: Improve validation of PMTU
Attached
Detach File
Event Timeline
Log In to Comment