Revision 0d62c4cf slirp/tcp_timer.c

b/slirp/tcp_timer.c
102 102
		;
103 103
	}
104 104
	tcp_iss += TCP_ISSINCR/PR_SLOWHZ;		/* increment iss */
105
#ifdef TCP_COMPAT_42
106
	if ((int)tcp_iss < 0)
107
		tcp_iss = 0;				/* XXX */
108
#endif
109 105
	tcp_now++;					/* for timestamps */
110 106
}
111 107

  
......
210 206
		 * retransmit times until then.
211 207
		 */
212 208
		if (tp->t_rxtshift > TCP_MAXRXTSHIFT / 4) {
213
/*			in_losing(tp->t_inpcb); */
214 209
			tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT);
215 210
			tp->t_srtt = 0;
216 211
		}
......
275 270
		if (tp->t_state < TCPS_ESTABLISHED)
276 271
			goto dropit;
277 272

  
278
/*		if (tp->t_socket->so_options & SO_KEEPALIVE && */
279 273
		if ((SO_OPTIONS) && tp->t_state <= TCPS_CLOSE_WAIT) {
280 274
		    	if (tp->t_idle >= TCPTV_KEEP_IDLE + TCP_MAXIDLE)
281 275
				goto dropit;
......
292 286
			 * correspondent TCP to respond.
293 287
			 */
294 288
			STAT(tcpstat.tcps_keepprobe++);
295
#ifdef TCP_COMPAT_42
296
			/*
297
			 * The keepalive packet must have nonzero length
298
			 * to get a 4.2 host to respond.
299
			 */
300
			tcp_respond(tp, &tp->t_template, (struct mbuf *)NULL,
301
			    tp->rcv_nxt - 1, tp->snd_una - 1, 0);
302
#else
303 289
			tcp_respond(tp, &tp->t_template, (struct mbuf *)NULL,
304 290
			    tp->rcv_nxt, tp->snd_una - 1, 0);
305
#endif
306 291
			tp->t_timer[TCPT_KEEP] = TCPTV_KEEPINTVL;
307 292
		} else
308 293
			tp->t_timer[TCPT_KEEP] = TCPTV_KEEP_IDLE;
......
310 295

  
311 296
	dropit:
312 297
		STAT(tcpstat.tcps_keepdrops++);
313
		tp = tcp_drop(tp, 0); /* ETIMEDOUT); */
298
		tp = tcp_drop(tp, 0);
314 299
		break;
315 300
	}
316 301

  

Also available in: Unified diff