mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Fixed last commit: can only check for bound sockets, not for unbound. There's some work to do for IPv6 in TCP...
This commit is contained in:
parent
a6a92d42f9
commit
0d1606ff23
@ -593,11 +593,7 @@ tcp_listen_dual_with_backlog(struct tcp_pcb *pcb, u8_t backlog)
|
|||||||
struct tcp_pcb *lpcb;
|
struct tcp_pcb *lpcb;
|
||||||
struct tcp_pcb_listen *l;
|
struct tcp_pcb_listen *l;
|
||||||
|
|
||||||
/* Dual listen only works on bound pcbs (or else we cannot check for
|
if (pcb->local_port != 0) {
|
||||||
duplicate port use. */
|
|
||||||
if (pcb->local_port == 0) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
/* Check that there's noone listening on this port already
|
/* Check that there's noone listening on this port already
|
||||||
(don't check the IP address since we'll set it to ANY */
|
(don't check the IP address since we'll set it to ANY */
|
||||||
for(l = tcp_listen_pcbs.listen_pcbs; l != NULL; l = l->next) {
|
for(l = tcp_listen_pcbs.listen_pcbs; l != NULL; l = l->next) {
|
||||||
@ -606,6 +602,7 @@ tcp_listen_dual_with_backlog(struct tcp_pcb *pcb, u8_t backlog)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lpcb = tcp_listen_with_backlog(pcb, backlog);
|
lpcb = tcp_listen_with_backlog(pcb, backlog);
|
||||||
if ((lpcb != NULL) &&
|
if ((lpcb != NULL) &&
|
||||||
|
Loading…
Reference in New Issue
Block a user