From cd22a8d8511b581f689bf9c8cbe520ace07f4f43 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 28 Jul 2010 16:48:51 +0000 Subject: [PATCH] Fixed bug #30565 (tcp_connect() check bound list): that check did no harm but never did anything --- CHANGELOG | 4 ++++ src/core/tcp.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 255c9496..b3cafde1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -229,6 +229,10 @@ HISTORY ++ Bugfixes: + 2010-07-27: Simon Goldschmidt + * tcp.c: Fixed bug #30565 (tcp_connect() check bound list): that check did no + harm but never did anything + 2010-07-21: Simon Goldschmidt * ip.c: Fixed invalid fix for bug #30402 (CHECKSUM_GEN_IP_INLINE does not add IP options) diff --git a/src/core/tcp.c b/src/core/tcp.c index 30116a86..c7a29c50 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -677,8 +677,8 @@ tcp_connect(struct tcp_pcb *pcb, ip_addr_t *ipaddr, u16_t port, now that the 5-tuple is unique. */ struct tcp_pcb *cpcb; int i; - /* Don't check listen PCBs, check bound-, active- and TIME-WAIT PCBs. */ - for (i = 1; i < NUM_TCP_PCB_LISTS; i++) { + /* Don't check listen- and bound-PCBs, check active- and TIME-WAIT PCBs. */ + for (i = 2; i < NUM_TCP_PCB_LISTS; i++) { for(cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { if ((cpcb->local_port == pcb->local_port) && (cpcb->remote_port == port) &&