summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_timewait.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2005-09-10 07:43:29 +0000
committerandre <andre@FreeBSD.org>2005-09-10 07:43:29 +0000
commit37d27a5a23a55f381f02d1af656bb44d2873d87a (patch)
tree8fe23008183279e179cfa3fc99933a2818b21aab /sys/netinet/tcp_timewait.c
parente74d0361d3a1e489a136b899dd637e3c004c6ab6 (diff)
downloadFreeBSD-src-37d27a5a23a55f381f02d1af656bb44d2873d87a.zip
FreeBSD-src-37d27a5a23a55f381f02d1af656bb44d2873d87a.tar.gz
In tcp_ctlinput() do not swap ip->ip_len a second time. It
has been done in icmp_input() already. This fixes the ICMP_UNREACH_NEEDFRAG case where no MTU was proposed in the ICMP reply. PR: kern/81813 Submitted by: Vitezslav Novy <vita at fio.cz> MFC after: 3 days
Diffstat (limited to 'sys/netinet/tcp_timewait.c')
-rw-r--r--sys/netinet/tcp_timewait.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
index b2f34c1..f8b0707 100644
--- a/sys/netinet/tcp_timewait.c
+++ b/sys/netinet/tcp_timewait.c
@@ -1170,10 +1170,11 @@ tcp_ctlinput(cmd, sa, vip)
/*
* If no alternative MTU was
* proposed, try the next smaller
- * one.
+ * one. ip->ip_len has already
+ * been swapped in icmp_input().
*/
if (!mtu)
- mtu = ip_next_mtu(ntohs(ip->ip_len),
+ mtu = ip_next_mtu(ip->ip_len,
1);
if (mtu < max(296, (tcp_minmss)
+ sizeof(struct tcpiphdr)))
OpenPOWER on IntegriCloud