Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145129549
D31770.id95612.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
948 B
Referenced Files
None
Subscribers
None
D31770.id95612.diff
View Options
diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c
--- a/sys/netipsec/ipsec_output.c
+++ b/sys/netipsec/ipsec_output.c
@@ -352,15 +352,29 @@
key_freesav(&sav);
pmtu = tcp_hc_getmtu(&inc);
- /* No entry in hostcache. */
- if (pmtu == 0)
- return (0);
+ /* No entry in hostcache. Use link MTU instead. */
+ if (pmtu == 0) {
+ switch (dst->sa.sa_family) {
+ case AF_INET:
+ pmtu = tcp_maxmtu(&inc, NULL);
+ break;
+#ifdef INET6
+ case AF_INET6:
+ pmtu = tcp_maxmtu6(&inc, NULL);
+ break;
+#endif
+ }
+ if (pmtu == 0)
+ return (0);
+
+ tcp_hc_updatemtu(&inc, pmtu);
+ }
hlen = ipsec_hdrsiz_internal(sp);
if (m_length(m, NULL) + hlen > pmtu) {
/*
* If we're forwarding generate ICMP message here,
- * so that it contains pmtu and not link mtu.
+ * so that it contains pmtu substraced by header size.
* Set error to EINPROGRESS, in order for the frame
* to be dropped silently.
*/
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 17, 6:50 AM (16 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28805236
Default Alt Text
D31770.id95612.diff (948 B)
Attached To
Mode
D31770: ipsec: If no PMTU in hostcache assume it's equal to link's MTU
Attached
Detach File
Event Timeline
Log In to Comment