Skip to content

Commit 4cf7909

Browse files
swarrenigrr
authored andcommitted
Fix typo in MDNS multi-interface advertising code
MDNSResponder::advertiseServices() was transmitting all service adverts on the same interface (AP) rather than once on STA and once on AP. Fix this simple mistake. With this change, both "ping esp8266.local" and "avahi-browse -a" see the ESP8266 from a test Linux PC, on both AP and STA interfaces (where applicable), with the ESP8266 running mDNS_Web_Server.ino modified for each of AP-only, STA-only and AP+STA modes. Note that no attempt has been made to make MDNSResponder::queryService() operate correctly with multiple interfaces, either in this commit or the commit this commit fixes. Fixes: a546d64 ("ESP8266mDNS: support AP and STA interfaces at once") Fixes #3101
1 parent c5c138e commit 4cf7909

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/ESP8266mDNS/ESP8266mDNS.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ size_t MDNSResponder::advertiseServices(){
888888
if (ip)
889889
_reply(0x0F, servicePtr->_name, servicePtr->_proto, servicePtr->_port, ip);
890890

891-
wifi_get_ip_info(SOFTAP_IF, &ip_info);
891+
wifi_get_ip_info(STATION_IF, &ip_info);
892892
ip = ip_info.ip.addr;
893893
if (ip)
894894
_reply(0x0F, servicePtr->_name, servicePtr->_proto, servicePtr->_port, ip);

0 commit comments

Comments
 (0)