Page MenuHomeFreeBSD

D3567.diff
No OneTemporary

D3567.diff

Index: sys/netinet/tcp_subr.c
===================================================================
--- sys/netinet/tcp_subr.c
+++ sys/netinet/tcp_subr.c
@@ -1541,11 +1541,6 @@
* in the route to the suggested new
* value (if given) and then notify.
*/
- bzero(&inc, sizeof(inc));
- inc.inc_faddr = faddr;
- inc.inc_fibnum =
- inp->inp_inc.inc_fibnum;
-
mtu = ntohs(icp->icmp_nextmtu);
/*
* If no alternative MTU was
@@ -1560,14 +1555,18 @@
mtu = V_tcp_minmss +
sizeof(struct tcpiphdr);
/*
- * Only cache the MTU if it
- * is smaller than the interface
- * or route MTU. tcp_mtudisc()
- * will do right thing by itself.
+ * Only process the offered MTU if it
+ * is smaller than the current one.
*/
- if (mtu <= tcp_maxmtu(&inc, NULL))
+ if (mtu < tp->t_maxopd +
+ sizeof(struct tcpiphdr)) {
+ bzero(&inc, sizeof(inc));
+ inc.inc_faddr = faddr;
+ inc.inc_fibnum =
+ inp->inp_inc.inc_fibnum;
tcp_hc_updatemtu(&inc, mtu);
- tcp_mtudisc(inp, mtu);
+ tcp_mtudisc(inp, mtu);
+ }
} else
inp = (*notify)(inp,
inetctlerrmap[cmd]);

File Metadata

Mime Type
text/plain
Expires
Mon, Jun 22, 11:00 PM (1 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34217680
Default Alt Text
D3567.diff (1 KB)

Event Timeline