Ver código fonte

Work around another confused-by-RST bug

tags/v0.9.3
Michael Brown 18 anos atrás
pai
commit
5edb85c8b4
1 arquivos alterados com 8 adições e 0 exclusões
  1. 8
    0
      src/net/tcp.c

+ 8
- 0
src/net/tcp.c Ver arquivo

@@ -516,6 +516,14 @@ int tcp_close ( struct tcp_connection *conn ) {
516 516
 		/* FIN consumes one byte on the snd stream */
517 517
 //		conn->snd_una++;
518 518
 		goto send_tcp_nomsg;
519
+	case TCP_TIME_WAIT:
520
+#warning "Fix me"
521
+		/* In TIME_WAIT, we should just be waiting for the
522
+		 * timer to expire, which will trigger the actual
523
+		 * closure.  However, because we get confused by RST
524
+		 * packets, we end up here.  This works around the
525
+		 * problem for now.
526
+		 */
519 527
 	case TCP_SYN_SENT:
520 528
 	case TCP_LISTEN:
521 529
 		/**

Carregando…
Cancelar
Salvar