ESP32 AP DNS sets multicast/broadcast routes, breaks other connections

kbaud1
Posts: 71
Joined: Wed Jan 17, 2018 11:55 pm

ESP32 AP DNS sets multicast/broadcast routes, breaks other connections

Postby kbaud1 » Tue Jun 02, 2020 9:15 pm

ESP32 AP DNS sets multicast/broadcast routes, breaks other connections

As described here: viewtopic.php?t=4909, the ESP32 wifi AP drivers create a default route that can break internet connections to clients who have other network connections: This problem can be solved by zeroing the gateway address during ESP32 adapter initialization (setting tcpip_adapter_ip_info_t.gw to 0.0.0.0).

However the ESP32 DNS server also creates broadcast and multicast routes that can similarly break these functionalities for clients who have other network connections. Does anyone know how the ESP32 might be configured to disable these routes as well? (There is no corresponding setting like tcpip_adapter_ip_info_t.bc or .mc field to be zeroed like the .gw field, for example.)

To replicate this problem with a Windows client, install 2 wifi adapters and connect one to a network with a device that responds to a multicast (224.0.0.0) or broadcast (255.255.255.255) ping (we used an iPhone that did both). Then connect the other adapter to the ESP32 AP. If its "metric" is higher (or maybe equal) you can no longer ping the device on the first network because the ESP32 has inadvertently hijacked all the traffic. (This can be seen in the Windows routing table.) The ESP32 can be configured to respond to the multicast/broadcast pings instead of ignoring them, but that's the opposite of what we want. How can we configure the ESP32 to not have the traffic rerouted to it in the first place?

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 117 guests