diff --git a/examples/protocols/sockets/udp_multicast/README.md b/examples/protocols/sockets/udp_multicast/README.md index 649bd61195..25224649f8 100644 --- a/examples/protocols/sockets/udp_multicast/README.md +++ b/examples/protocols/sockets/udp_multicast/README.md @@ -8,7 +8,7 @@ The behaviour of the example is: * Listens to specified multicast addresses (one IPV4 and/or one IPV6). * Print any UDP packets received as ASCII text. -* If no packets are received it will periodicially (after 2.5 seconds) send its own plaintext packet(s) to the multicast address(es). +* If no packets are received it will periodically (after 2.5 seconds) send its own plaintext packet(s) to the multicast address(es). ## Configuration diff --git a/examples/protocols/sockets/udp_multicast/main/udp_multicast_example_main.c b/examples/protocols/sockets/udp_multicast/main/udp_multicast_example_main.c index 2eed56f510..89eafe65e8 100644 --- a/examples/protocols/sockets/udp_multicast/main/udp_multicast_example_main.c +++ b/examples/protocols/sockets/udp_multicast/main/udp_multicast_example_main.c @@ -417,8 +417,12 @@ static void mcast_example_task(void *pvParameters) #ifdef CONFIG_EXAMPLE_IPV4_ONLY hints.ai_family = AF_INET; // For an IPv4 socket #else + +#ifdef CONFIG_ESP_NETIF_TCPIP_LWIP // Resolving IPv4 mapped IPv6 addresses is supported only in the official TCPIP_LWIP stack (esp-lwip) hints.ai_family = AF_INET6; // For an IPv4 socket with V4 mapped addresses hints.ai_flags |= AI_V4MAPPED; +#endif // CONFIG_ESP_NETIF_TCPIP_LWIP + #endif int err = getaddrinfo(CONFIG_EXAMPLE_MULTICAST_IPV4_ADDR, NULL,