diff options
author | dim <dim@FreeBSD.org> | 2015-10-01 19:02:45 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-10-01 19:02:45 +0000 |
commit | c88ca1c4064bdfc5aa9a040453a2bedcab5563cf (patch) | |
tree | 65e063ba4063b01c208d44deddda2fe59ac5f224 /sys/netinet/tcp_subr.c | |
parent | d3edc9664e05776279ed8ad8a20ad14cdd579030 (diff) | |
parent | e6448d3ce04113fa55305f4d9b53a92f11189be6 (diff) | |
download | FreeBSD-src-c88ca1c4064bdfc5aa9a040453a2bedcab5563cf.zip FreeBSD-src-c88ca1c4064bdfc5aa9a040453a2bedcab5563cf.tar.gz |
Merge ^/head r288197 through r288456.
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index fa278a8..a20bd81 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1541,11 +1541,6 @@ tcp_ctlinput(int cmd, struct sockaddr *sa, void *vip) * 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 @@ tcp_ctlinput(int cmd, struct sockaddr *sa, void *vip) 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]); |