mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-14 13:41:23 +03:00
Fixes for IPv6, added in CI (#5557)
This commit is contained in:
@ -191,19 +191,18 @@ bool MDNSResponder::_allocUDPContext(void) {
|
||||
|
||||
_releaseUDPContext();
|
||||
|
||||
ip_addr_t multicast_addr;
|
||||
#ifdef MDNS_IP4_SUPPORT
|
||||
multicast_addr.addr = DNS_MQUERY_IPV4_GROUP_INIT;
|
||||
ip_addr_t multicast_addr = DNS_MQUERY_IPV4_GROUP_INIT;
|
||||
#endif
|
||||
#ifdef MDNS_IP6_SUPPORT
|
||||
//TODO: set multicast address
|
||||
//TODO: set multicast address (lwip_joingroup() is IPv4 only at the time of writing)
|
||||
multicast_addr.addr = DNS_MQUERY_IPV6_GROUP_INIT;
|
||||
#endif
|
||||
if (ERR_OK == igmp_joingroup(IP_ADDR_ANY, &multicast_addr)) {
|
||||
if (ERR_OK == igmp_joingroup(IP4_ADDR_ANY4, ip_2_ip4(&multicast_addr))) {
|
||||
m_pUDPContext = new UdpContext;
|
||||
m_pUDPContext->ref();
|
||||
|
||||
if (m_pUDPContext->listen(IP_ADDR_ANY, DNS_MQUERY_PORT)) {
|
||||
if (m_pUDPContext->listen(IP4_ADDR_ANY, DNS_MQUERY_PORT)) {
|
||||
m_pUDPContext->setMulticastTTL(MDNS_MULTICAST_TTL);
|
||||
m_pUDPContext->onRx(std::bind(&MDNSResponder::_callProcess, this));
|
||||
|
||||
|
Reference in New Issue
Block a user