Deleted Added
full compact
tcp_timer.c (122326) tcp_timer.c (122922)
1/*
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)tcp_timer.c 8.2 (Berkeley) 5/24/95
1/*
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)tcp_timer.c 8.2 (Berkeley) 5/24/95
34 * $FreeBSD: head/sys/netinet/tcp_timer.c 122326 2003-11-08 22:57:13Z sam $
34 * $FreeBSD: head/sys/netinet/tcp_timer.c 122922 2003-11-20 20:07:39Z andre $
35 */
36
37#include "opt_inet6.h"
38#include "opt_tcpdebug.h"
39
40#include <sys/param.h>
41#include <sys/kernel.h>
42#include <sys/lock.h>

--- 503 unchanged lines hidden (view full) ---

546 * our third SYN to work-around some broken terminal servers
547 * (most of which have hopefully been retired) that have bad VJ
548 * header compression code which trashes TCP segments containing
549 * unknown-to-them TCP options.
550 */
551 if ((tp->t_state == TCPS_SYN_SENT) && (tp->t_rxtshift == 3))
552 tp->t_flags &= ~(TF_REQ_SCALE|TF_REQ_TSTMP|TF_REQ_CC);
553 /*
35 */
36
37#include "opt_inet6.h"
38#include "opt_tcpdebug.h"
39
40#include <sys/param.h>
41#include <sys/kernel.h>
42#include <sys/lock.h>

--- 503 unchanged lines hidden (view full) ---

546 * our third SYN to work-around some broken terminal servers
547 * (most of which have hopefully been retired) that have bad VJ
548 * header compression code which trashes TCP segments containing
549 * unknown-to-them TCP options.
550 */
551 if ((tp->t_state == TCPS_SYN_SENT) && (tp->t_rxtshift == 3))
552 tp->t_flags &= ~(TF_REQ_SCALE|TF_REQ_TSTMP|TF_REQ_CC);
553 /*
554 * If losing, let the lower level know and try for
555 * a better route. Also, if we backed off this far,
556 * our srtt estimate is probably bogus. Clobber it
557 * so we'll take the next rtt measurement as our srtt;
554 * If we backed off this far, our srtt estimate is probably bogus.
555 * Clobber it so we'll take the next rtt measurement as our srtt;
558 * move the current srtt into rttvar to keep the current
559 * retransmit times until then.
560 */
561 if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) {
562#ifdef INET6
563 if ((tp->t_inpcb->inp_vflag & INP_IPV6) != 0)
564 in6_losing(tp->t_inpcb);
565 else
566#endif
556 * move the current srtt into rttvar to keep the current
557 * retransmit times until then.
558 */
559 if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) {
560#ifdef INET6
561 if ((tp->t_inpcb->inp_vflag & INP_IPV6) != 0)
562 in6_losing(tp->t_inpcb);
563 else
564#endif
567 in_losing(tp->t_inpcb);
568 tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT);
569 tp->t_srtt = 0;
570 }
571 tp->snd_nxt = tp->snd_una;
572 tp->snd_recover = tp->snd_max;
573 /*
574 * Force a segment to be sent.
575 */

--- 52 unchanged lines hidden ---
565 tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT);
566 tp->t_srtt = 0;
567 }
568 tp->snd_nxt = tp->snd_una;
569 tp->snd_recover = tp->snd_max;
570 /*
571 * Force a segment to be sent.
572 */

--- 52 unchanged lines hidden ---