mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-23 16:47:05 +08:00
Fixed bug #20180 (TCP pcbs listening on IP_ADDR_ANY could get changed in netif_set_ipaddr if previous netif->ip_addr.addr was 0.
This commit is contained in:
@@ -251,7 +251,8 @@ netif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr)
|
||||
}
|
||||
for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) {
|
||||
/* PCB bound to current local interface address? */
|
||||
if (ip_addr_cmp(&(lpcb->local_ip), &(netif->ip_addr))) {
|
||||
if ((!(ip_addr_isany(&(lpcb->local_ip)))) &&
|
||||
(ip_addr_cmp(&(lpcb->local_ip), &(netif->ip_addr)))) {
|
||||
/* The PCB is listening to the old ipaddr and
|
||||
* is set to listen to the new one instead */
|
||||
ip_addr_set(&(lpcb->local_ip), ipaddr);
|
||||
|
||||
Reference in New Issue
Block a user