Skip to content

Commit be18c76

Browse files
authored
Udp: default local_ip to IP_ANY_TYPE when IPv6 is enabled (#750)
1 parent af2671d commit be18c76

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libraries/WiFi/src/include/UdpContext.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ class UdpContext {
5050
, _tx_buf_cur(0)
5151
, _tx_buf_offset(0) {
5252
_pcb = udp_new();
53+
#if LWIP_IPV6
54+
// local_ip defaults to 0.0.0.0
55+
// which is problematic for sending IPv6 packets
56+
ip_addr_set_ipaddr(&_pcb->local_ip, IP_ANY_TYPE);
57+
#endif
5358
#ifdef LWIP_MAYBE_XCC
5459
_mcast_ttl = 1;
5560
#endif

0 commit comments

Comments
 (0)