diff --git a/components/mdns/idf_component.yml b/components/mdns/idf_component.yml index 953eb8099..53538f8d3 100644 --- a/components/mdns/idf_component.yml +++ b/components/mdns/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.0.5" +version: "1.0.6" description: mDNS dependencies: idf: diff --git a/components/mdns/mdns_networking_lwip.c b/components/mdns/mdns_networking_lwip.c index 86b4c6c5e..f600ada25 100644 --- a/components/mdns/mdns_networking_lwip.c +++ b/components/mdns/mdns_networking_lwip.c @@ -339,8 +339,12 @@ size_t _mdns_udp_pcb_write(mdns_if_t tcpip_if, mdns_ip_protocol_t ip_protocol, c memcpy((uint8_t *)pbt->payload, data, len); ip_addr_t ip_add_copy; +#if CONFIG_LWIP_IPV6 ip_add_copy.type = ip->type; - memcpy(&(ip_add_copy.u_addr),&(ip->u_addr),sizeof(ip_add_copy.u_addr)); + memcpy(&(ip_add_copy.u_addr), &(ip->u_addr), sizeof(ip_add_copy.u_addr)); +#else + memcpy(&(ip_add_copy.addr), &(ip->u_addr), sizeof(ip_addr_copy.addr)); +#endif // CONFIG_LWIP_IPV6 mdns_api_call_t msg = { .tcpip_if = tcpip_if,