X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/7cc62c26d645736708f4d4e7e309108691195a33..552daad2641f22d21483aa93cc0fc8e44a44c1c9:/usr/src/sys/netinet/tcp_timer.c diff --git a/usr/src/sys/netinet/tcp_timer.c b/usr/src/sys/netinet/tcp_timer.c index 3318bf00fd..6ee4c91737 100644 --- a/usr/src/sys/netinet/tcp_timer.c +++ b/usr/src/sys/netinet/tcp_timer.c @@ -3,7 +3,7 @@ * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)tcp_timer.c 7.6 (Berkeley) %G% + * @(#)tcp_timer.c 7.8 (Berkeley) %G% */ #include "param.h" @@ -159,7 +159,7 @@ tcp_timers(tp, timer) rexmt *= tcp_backoff[tp->t_rxtshift]; tp->t_rxtshift++; TCPT_RANGESET(tp->t_timer[TCPT_REXMT], rexmt, - TCPTV_MIN, TCPTV_MAX); + TCPTV_MIN, TCPTV_REXMTMAX); /* * If losing, let the lower level know * and try for a better route. @@ -221,8 +221,17 @@ tcp_timers(tp, timer) * correspondent TCP to respond. */ tcpstat.tcps_keepprobe++; +#ifdef TCP_COMPAT_42 + /* + * The keepalive packet must have nonzero length + * to get a 4.2 host to respond. + */ tcp_respond(tp, tp->t_template, - tp->rcv_nxt - tcp_keeplen, tp->snd_una - 1, 0); + tp->rcv_nxt - 1, tp->snd_una - 1, 0); +#else + tcp_respond(tp, tp->t_template, + tp->rcv_nxt, tp->snd_una - 1, 0); +#endif } tp->t_timer[TCPT_KEEP] = TCPTV_KEEP; break;