|
@@ -466,6 +466,14 @@ int tcp_connectto ( struct tcp_connection *conn,
|
466
|
466
|
return -EISCONN;
|
467
|
467
|
}
|
468
|
468
|
|
|
469
|
+#warning "Fix the port re-use bug"
|
|
470
|
+ /* If we re-use the same port, the connection should be reset
|
|
471
|
+ * and a new connection set up. This doesn't happen yet, so
|
|
472
|
+ * force the use of a new (random) port to avoid hitting the
|
|
473
|
+ * problem.
|
|
474
|
+ */
|
|
475
|
+ conn->local_port = 0;
|
|
476
|
+
|
469
|
477
|
/* Add the connection to the set of listening connections */
|
470
|
478
|
if ( ( rc = tcp_listen ( conn, conn->local_port ) ) != 0 ) {
|
471
|
479
|
return rc;
|