aboutsummaryrefslogtreecommitdiff
path: root/src/tcp_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tcp_input.c')
-rw-r--r--src/tcp_input.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tcp_input.c b/src/tcp_input.c
index 5f5701a..0fe0075 100644
--- a/src/tcp_input.c
+++ b/src/tcp_input.c
@@ -449,8 +449,8 @@ findso:
* Reset idle time and keep-alive timer.
*/
tp->t_idle = 0;
- if (slirp_do_keepalive)
- tp->t_timer[TCPT_KEEP] = TCPTV_KEEPINTVL;
+ if (tp->t_state < TCPS_ESTABLISHED)
+ tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_INIT;
else
tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_IDLE;
@@ -1139,8 +1139,8 @@ findso:
* specification, but if we don't get a FIN
* we'll hang forever.
*/
- if (so->so_state & SS_FCANTRCVMORE) {
- tp->t_timer[TCPT_2MSL] = TCP_MAXIDLE;
+ if (so->so_state & (SS_FCANTRCVMORE | SS_NOFDREF)) {
+ tp->t_timer[TCPT_2MSL] = TCP_LINGERTIME;
}
tp->t_state = TCPS_FIN_WAIT_2;
}