http://git.etherboot.org
/
people
/
xl0
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
09688cb
)
Temporarily work around the bug when port numbers are reused between
author
Michael Brown
<mcb30@etherboot.org>
Wed, 9 Aug 2006 14:44:58 +0000
(14:44 +0000)
committer
Michael Brown
<mcb30@etherboot.org>
Wed, 9 Aug 2006 14:44:58 +0000
(14:44 +0000)
subsequent runs.
src/net/tcp.c
patch
|
blob
|
history
diff --git
a/src/net/tcp.c
b/src/net/tcp.c
index
0ec119e
..
0de629e
100644
(file)
--- a/
src/net/tcp.c
+++ b/
src/net/tcp.c
@@
-562,6
+562,13
@@
int tcp_listen ( struct tcp_connection *conn, uint16_t local_port ) {
static uint16_t try_port = 1024;
int rc;
+#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
+ * randomise the port to avoid hitting the problem.
+ */
+ try_port = random();
+
/* If no port specified, find the first available port */
if ( ! local_port ) {
for ( ; try_port ; try_port++ ) {