won't be received, but will reset idle time; don't reset idle time unless
packet received
SCCS-vsn: sys/netinet/tcp_timer.c 6.14
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)tcp_timer.c 6.13 (Berkeley) %G%
+ * @(#)tcp_timer.c 6.14 (Berkeley) %G%
case TCPT_KEEP:
if (tp->t_state < TCPS_ESTABLISHED)
goto dropit;
case TCPT_KEEP:
if (tp->t_state < TCPS_ESTABLISHED)
goto dropit;
- if (tp->t_inpcb->inp_socket->so_options & SO_KEEPALIVE) {
+ if (tp->t_inpcb->inp_socket->so_options & SO_KEEPALIVE &&
+ tp->t_state <= TCPS_CLOSE_WAIT) {
if (tp->t_idle >= TCPTV_MAXIDLE)
goto dropit;
/*
if (tp->t_idle >= TCPTV_MAXIDLE)
goto dropit;
/*
*/
tcp_respond(tp,
tp->t_template, tp->rcv_nxt-1, tp->snd_una-1, 0);
*/
tcp_respond(tp,
tp->t_template, tp->rcv_nxt-1, tp->snd_una-1, 0);
- } else
- tp->t_idle = 0;
tp->t_timer[TCPT_KEEP] = TCPTV_KEEP;
break;
dropit:
tp->t_timer[TCPT_KEEP] = TCPTV_KEEP;
break;
dropit: