summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown2006-12-06 00:15:35 +0100
committerMichael Brown2006-12-06 00:15:35 +0100
commitb9f9230661f4fa9bc15b02963a8cbaa417263967 (patch)
tree9c484d020d4b5a110adace5331b41955a06fda5e /src
parentTweaked retry messages (diff)
downloadipxe-b9f9230661f4fa9bc15b02963a8cbaa417263967.tar.gz
ipxe-b9f9230661f4fa9bc15b02963a8cbaa417263967.tar.xz
ipxe-b9f9230661f4fa9bc15b02963a8cbaa417263967.zip
Work around another instance of the port re-use bug.
Diffstat (limited to 'src')
-rw-r--r--src/net/tcp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/net/tcp.c b/src/net/tcp.c
index f8ac7011c..aa49366c2 100644
--- a/src/net/tcp.c
+++ b/src/net/tcp.c
@@ -466,6 +466,14 @@ int tcp_connectto ( struct tcp_connection *conn,
return -EISCONN;
}
+#warning "Fix the port re-use bug"
+ /* If we re-use the same port, the connection should be reset
+ * and a new connection set up. This doesn't happen yet, so
+ * force the use of a new (random) port to avoid hitting the
+ * problem.
+ */
+ conn->local_port = 0;
+
/* Add the connection to the set of listening connections */
if ( ( rc = tcp_listen ( conn, conn->local_port ) ) != 0 ) {
return rc;