Skip to content

Commit f11cc4d

Browse files
authored
Make MDNS compile with IPv6 enabled (#1651)
1 parent 8c2901d commit f11cc4d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/LEAmDNS/src/LEAmDNS_Control.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,11 @@ bool MDNSResponder::_parseQuery(const MDNSResponder::stcMDNS_MsgHeader& p_MsgHea
268268
remote = m_pUDPContext->getRemoteAddress();
269269
local = WiFi.localIP();
270270
netmask = WiFi.subnetMask();
271+
#if LWIP_IPV6
272+
if (ip4_addr_netcmp(&remote.u_addr.ip4, &local.u_addr.ip4, &netmask.u_addr.ip4))
273+
#else
271274
if (ip4_addr_netcmp(&remote, &local, &netmask))
275+
#endif
272276
// ip_info IPInfo_Local;
273277
// ip_info IPInfo_Remote;
274278
// if (((IPInfo_Remote.ip.addr = m_pUDPContext->getRemoteAddress()))

0 commit comments

Comments
 (0)