Fixed bug #30565 (tcp_connect() check bound list): that check did no harm but never did anything

This commit is contained in:
goldsimon 2010-07-28 16:48:51 +00:00
parent 7f7df4ae19
commit cd22a8d851
2 changed files with 6 additions and 2 deletions

View File

@ -229,6 +229,10 @@ HISTORY
++ Bugfixes: ++ 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 2010-07-21: Simon Goldschmidt
* ip.c: Fixed invalid fix for bug #30402 (CHECKSUM_GEN_IP_INLINE does not * ip.c: Fixed invalid fix for bug #30402 (CHECKSUM_GEN_IP_INLINE does not
add IP options) add IP options)

View File

@ -677,8 +677,8 @@ tcp_connect(struct tcp_pcb *pcb, ip_addr_t *ipaddr, u16_t port,
now that the 5-tuple is unique. */ now that the 5-tuple is unique. */
struct tcp_pcb *cpcb; struct tcp_pcb *cpcb;
int i; int i;
/* Don't check listen PCBs, check bound-, active- and TIME-WAIT PCBs. */ /* Don't check listen- and bound-PCBs, check active- and TIME-WAIT PCBs. */
for (i = 1; i < NUM_TCP_PCB_LISTS; i++) { for (i = 2; i < NUM_TCP_PCB_LISTS; i++) {
for(cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { for(cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) {
if ((cpcb->local_port == pcb->local_port) && if ((cpcb->local_port == pcb->local_port) &&
(cpcb->remote_port == port) && (cpcb->remote_port == port) &&