summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_reass.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2004-04-23 22:44:59 +0000
committerandre <andre@FreeBSD.org>2004-04-23 22:44:59 +0000
commit7357a88fdbc1ed5cd677cc232be3591207aaa45b (patch)
tree9ba14d9ff519cc297bed1d273354626436b20c1f /sys/netinet/tcp_reass.c
parenta2939bc1de354a17c2e184e24be18cb195843a07 (diff)
downloadFreeBSD-src-7357a88fdbc1ed5cd677cc232be3591207aaa45b.zip
FreeBSD-src-7357a88fdbc1ed5cd677cc232be3591207aaa45b.tar.gz
Correct an edge case in tcp_mss() where the cached path MTU
from tcp_hostcache would have overridden a (now) lower MTU of an interface or route that changed since first PMTU discovery. The bug would have caused TCP to redo the PMTU discovery when not strictly necessary. Make a comment about already pre-initialized default values more clear. Reviewed by: sam
Diffstat (limited to 'sys/netinet/tcp_reass.c')
-rw-r--r--sys/netinet/tcp_reass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index d73e8fe..90cda71 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -2793,7 +2793,7 @@ tcp_mss(tp, offer)
so = inp->inp_socket;
/*
- * no route to sender, take default mss and return
+ * no route to sender, stay with default mss and return
*/
if (maxmtu == 0)
return;
@@ -2851,7 +2851,7 @@ tcp_mss(tp, offer)
* else, use the link mtu.
*/
if (metrics.rmx_mtu)
- mss = metrics.rmx_mtu - min_protoh;
+ mss = min(metrics.rmx_mtu, maxmtu) - min_protoh;
else {
#ifdef INET6
if (isipv6) {
OpenPOWER on IntegriCloud