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
This commit is contained in:
Andre Oppermann 2005-09-10 07:43:29 +00:00
parent df7eabb059
commit ffabe3dce8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149929
2 changed files with 6 additions and 4 deletions

View File

@ -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)))

View File

@ -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)))