Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LEAmDNS fixes #7786

Merged
merged 4 commits into from
Dec 22, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
LEAmDNSv1: fix macro name
  • Loading branch information
d-a-v committed Dec 21, 2020
commit ee539cf0ea7482c971a7ce2506dded9abb8ead91
7 changes: 4 additions & 3 deletions libraries/ESP8266mDNS/src/LEAmDNS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 28,8 @@
#include "ESP8266mDNS.h"
#include "LEAmDNS_Priv.h"
#include <LwipIntf.h> // LwipIntf::stateUpCB()
#include "lwip/igmp.h"
#include <lwip/igmp.h>
#include <lwip/prot/dns.h>

namespace esp8266
{
Expand Down Expand Up @@ -1304,7 1305,7 @@ bool MDNSResponder::_joinMulticastGroups(void)
{
if (netif_is_up(pNetIf))
{
#ifdef MDNS_IPV4_SUPPORT
#ifdef MDNS_IP4_SUPPORT
ip_addr_t multicast_addr_V4 = DNS_MQUERY_IPV4_GROUP_INIT;
if (!(pNetIf->flags & NETIF_FLAG_IGMP))
{
Expand Down Expand Up @@ -1354,7 1355,7 @@ bool MDNSResponder::_leaveMulticastGroups()
bResult = true;

// Leave multicast group(s)
#ifdef MDNS_IPV4_SUPPORT
#ifdef MDNS_IP4_SUPPORT
ip_addr_t multicast_addr_V4 = DNS_MQUERY_IPV4_GROUP_INIT;
if (ERR_OK != igmp_leavegroup_netif(pNetIf, ip_2_ip4(&multicast_addr_V4)))
{
Expand Down
3 changes: 2 additions & 1 deletion libraries/ESP8266mDNS/src/LEAmDNS.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 130,9 @@ namespace MDNSImplementation
#endif

#define MDNS_IP4_SUPPORT
#if LWIP_IPV6
//#define MDNS_IP6_SUPPORT

#endif

#ifdef MDNS_IP4_SUPPORT
#define MDNS_IP4_SIZE 4
Expand Down
4 changes: 2 additions & 2 deletions libraries/ESP8266mDNS/src/LEAmDNS_Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 97,8 @@ bool MDNSResponder::_process(bool p_bUserContext)
bool MDNSResponder::_restart(void)
{

return ((_resetProbeStatus(true)) && // Stop and restart probing
(_allocUDPContext())); // Restart UDP
return ((_resetProbeStatus(true/*restart*/)) && // Stop and restart probing
(_allocUDPContext())); // Restart UDP
}

/**
Expand Down
15 changes: 7 additions & 8 deletions libraries/ESP8266mDNS/src/LEAmDNS_Priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 94,13 @@ namespace MDNSImplementation
#define DEBUG_EX_RX(A) do { (void)0; } while (0)
#endif


/* Replaced by 'lwip/prot/dns.h' definitions
#ifdef MDNS_IP4_SUPPORT
#define MDNS_MULTICAST_ADDR_IP4 (IPAddress(224, 0, 0, 251)) // ip_addr_t v4group = DNS_MQUERY_IPV4_GROUP_INIT
#endif
#ifdef MDNS_IP6_SUPPORT
#define MDNS_MULTICAST_ADDR_IP6 (IPAddress("FF02::FB")) // ip_addr_t v6group = DNS_MQUERY_IPV6_GROUP_INIT
#endif*/
/* already defined in lwIP ('lwip/prot/dns.h')
#ifdef MDNS_IP4_SUPPORT
#define DNS_MQUERY_IPV4_GROUP_INIT (IPAddress(224, 0, 0, 251)) // ip_addr_t v4group = DNS_MQUERY_IPV4_GROUP_INIT
#endif
#ifdef MDNS_IP6_SUPPORT
#define DNS_MQUERY_IPV6_GROUP_INIT IPADDR6_INIT_HOST(0xFF020000,0,0,0xFB) // ip_addr_t v6group = DNS_MQUERY_IPV6_GROUP_INIT
#endif*/
//#define MDNS_MULTICAST_PORT 5353

/*
Expand Down
6 changes: 0 additions & 6 deletions tests/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 329,6 @@ OPT_ARDUINO_LIBS ?= \
LEAmDNS_Structs.cpp \
LEAmDNS_Transfer.cpp \
ESP8266mDNS.cpp \
LEAmDNS2Host.cpp \
LEAmDNS2Host_Control.cpp \
LEAmDNS2Host_Debug.cpp \
LEAmDNS2Host_Structs.cpp \
LEAmDNS2Host_Transfer.cpp \
LEAmDNS2_Backbone.cpp \
) \
ArduinoOTA/ArduinoOTA.cpp \
DNSServer/src/DNSServer.cpp \
Expand Down