mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
fix bug #54315 (IPV6_V6ONLY socket accepts IPV4 connections)
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
parent
c3d8b1ca80
commit
258cab1b22
@ -734,7 +734,11 @@ tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port)
|
||||
}
|
||||
}
|
||||
|
||||
if (!ip_addr_isany(ipaddr)) {
|
||||
if (!ip_addr_isany(ipaddr)
|
||||
#if LWIP_IPV4 && LWIP_IPV6
|
||||
|| (IP_GET_TYPE(ipaddr) != IP_GET_TYPE(&pcb->local_ip))
|
||||
#endif /* LWIP_IPV4 && LWIP_IPV6 */
|
||||
) {
|
||||
ip_addr_set(&pcb->local_ip, ipaddr);
|
||||
}
|
||||
pcb->local_port = port;
|
||||
|
Loading…
Reference in New Issue
Block a user