Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(async): Update IP setup in AsyncUDP
  • Loading branch information
me-no-dev committed Jul 8, 2025
commit 7e69af6b09182abea3a2cc4c7ee0b3ea89a794d8
17 changes: 4 additions & 13 deletions libraries/AsyncUDP/src/AsyncUDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,8 @@ bool AsyncUDP::listen(const ip_addr_t *addr, uint16_t port) {
}
close();
if (addr) {
IP_SET_TYPE_VAL(_pcb->local_ip, addr->type);
IP_SET_TYPE_VAL(_pcb->remote_ip, addr->type);
IP_SET_TYPE(_pcb->local_ip, IP_GET_TYPE(addr));
IP_SET_TYPE(_pcb->remote_ip, IP_GET_TYPE(addr));
}
if (_udp_bind(_pcb, addr, port) != ERR_OK) {
return false;
Expand Down Expand Up @@ -692,17 +692,8 @@ bool AsyncUDP::listenMulticast(const ip_addr_t *addr, uint16_t port, uint8_t ttl
return false;
}

#if CONFIG_LWIP_IPV6
if (IP_IS_V6(addr)) {
IP_SET_TYPE(&bind_addr, IPADDR_TYPE_V6);
ip6_addr_set_any(&bind_addr.u_addr.ip6);
} else {
#endif
IP_SET_TYPE(&bind_addr, IPADDR_TYPE_V4);
ip4_addr_set_any(&bind_addr.u_addr.ip4);
#if CONFIG_LWIP_IPV6
}
#endif
IP_SET_TYPE(&bind_addr, IP_GET_TYPE(addr));
ip_addr_set_any(IP_IS_V6(addr), &bind_addr);
if (!listen(&bind_addr, port)) {
return false;
}
Expand Down
Loading