Fixed bug in Path MTU Discovery that caused the system to have to re-

discover the Path MTU for each connection if the connecting host didn't
offer an initial MSS.

Submitted by:	davidg & olah
This commit is contained in:
David Greenman 1996-02-22 11:46:39 +00:00
parent 4715842e4d
commit f9d5a964af
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14181
2 changed files with 8 additions and 48 deletions

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
* $Id: tcp_input.c,v 1.34 1995/12/14 09:53:47 phk Exp $
* $Id: tcp_input.c,v 1.35 1996/01/31 08:22:24 olah Exp $
*/
#ifndef TUBA_INCLUDE
@ -331,23 +331,6 @@ tcp_input(m, iphlen)
}
optlen = off - sizeof (struct tcphdr);
optp = mtod(m, u_char *) + sizeof (struct tcpiphdr);
/*
* Do quick retrieval of timestamp options ("options
* prediction?"). If timestamp is the only option and it's
* formatted as recommended in RFC 1323 appendix A, we
* quickly get the values now and not bother calling
* tcp_dooptions(), etc.
*/
if ((optlen == TCPOLEN_TSTAMP_APPA ||
(optlen > TCPOLEN_TSTAMP_APPA &&
optp[TCPOLEN_TSTAMP_APPA] == TCPOPT_EOL)) &&
*(u_long *)optp == htonl(TCPOPT_TSTAMP_HDR) &&
(ti->ti_flags & TH_SYN) == 0) {
to.to_flag |= TOF_TS;
to.to_tsval = ntohl(*(u_long *)(optp + 4));
to.to_tsecr = ntohl(*(u_long *)(optp + 8));
optp = NULL; /* we've parsed the options */
}
}
tiflags = ti->ti_flags;
@ -456,9 +439,8 @@ findpcb:
* Process options if not in LISTEN state,
* else do it below (after getting remote address).
*/
if (optp && tp->t_state != TCPS_LISTEN)
tcp_dooptions(tp, optp, optlen, ti,
&to);
if (tp->t_state != TCPS_LISTEN)
tcp_dooptions(tp, optp, optlen, ti, &to);
/*
* Header prediction: check for the two common cases
@ -658,9 +640,7 @@ findpcb:
taop = &tao_noncached;
bzero(taop, sizeof(*taop));
}
if (optp)
tcp_dooptions(tp, optp, optlen, ti,
&to);
tcp_dooptions(tp, optp, optlen, ti, &to);
if (iss)
tp->iss = iss;
else

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
* $Id: tcp_input.c,v 1.34 1995/12/14 09:53:47 phk Exp $
* $Id: tcp_input.c,v 1.35 1996/01/31 08:22:24 olah Exp $
*/
#ifndef TUBA_INCLUDE
@ -331,23 +331,6 @@ tcp_input(m, iphlen)
}
optlen = off - sizeof (struct tcphdr);
optp = mtod(m, u_char *) + sizeof (struct tcpiphdr);
/*
* Do quick retrieval of timestamp options ("options
* prediction?"). If timestamp is the only option and it's
* formatted as recommended in RFC 1323 appendix A, we
* quickly get the values now and not bother calling
* tcp_dooptions(), etc.
*/
if ((optlen == TCPOLEN_TSTAMP_APPA ||
(optlen > TCPOLEN_TSTAMP_APPA &&
optp[TCPOLEN_TSTAMP_APPA] == TCPOPT_EOL)) &&
*(u_long *)optp == htonl(TCPOPT_TSTAMP_HDR) &&
(ti->ti_flags & TH_SYN) == 0) {
to.to_flag |= TOF_TS;
to.to_tsval = ntohl(*(u_long *)(optp + 4));
to.to_tsecr = ntohl(*(u_long *)(optp + 8));
optp = NULL; /* we've parsed the options */
}
}
tiflags = ti->ti_flags;
@ -456,9 +439,8 @@ findpcb:
* Process options if not in LISTEN state,
* else do it below (after getting remote address).
*/
if (optp && tp->t_state != TCPS_LISTEN)
tcp_dooptions(tp, optp, optlen, ti,
&to);
if (tp->t_state != TCPS_LISTEN)
tcp_dooptions(tp, optp, optlen, ti, &to);
/*
* Header prediction: check for the two common cases
@ -658,9 +640,7 @@ findpcb:
taop = &tao_noncached;
bzero(taop, sizeof(*taop));
}
if (optp)
tcp_dooptions(tp, optp, optlen, ti,
&to);
tcp_dooptions(tp, optp, optlen, ti, &to);
if (iss)
tp->iss = iss;
else