8000 LEAmDNS Fixes 1.2 by LaborEtArs · Pull Request #5641 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

LEAmDNS Fixes 1.2 #5641

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

Merged
merged 7 commits into from
Jan 22, 2019
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
LEAmDNS_Fixes_1.2
  • Loading branch information
LaborEtArs committed Jan 19, 2019
commit c7869b55e894499c940ef7c7eacba9410654af69
4 changes: 2 additions & 2 deletions libraries/ESP8266mDNS/src/LEAmDNS_Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ bool MDNSResponder::_parseQuery(const MDNSResponder::stcMDNS_MsgHeader& p_MsgHea

sendParameter.m_bResponse = true;
sendParameter.m_bAuthorative = true;
sendParameter.m_bCacheFlush = false;
//sendParameter.m_bCacheFlush = false;

bResult = _sendMDNSMessage(sendParameter);
}
Expand Down Expand Up @@ -1214,7 +1214,7 @@ bool MDNSResponder::_sendHostProbe(void) {

//sendParameter.m_pQuestions->m_bUnicast = true;
sendParameter.m_pQuestions->m_Header.m_Attributes.m_u16Type = DNS_RRTYPE_ANY;
sendParameter.m_pQuestions->m_Header.m_Attributes.m_u16Class = (/*0x8000 |*/ DNS_RRCLASS_IN); // Unicast & INternet
sendParameter.m_pQuestions->m_Header.m_Attributes.m_u16Class = (0x8000 | DNS_RRCLASS_IN); // UNICAST & INternet

// Add known answers
#ifdef MDNS_IP4_SUPPORT
Expand Down
8 changes: 4 additions & 4 deletions libraries/ESP8266mDNS/src/LEAmDNS_Transfer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1439,8 +1439,8 @@ bool MDNSResponder::_writeMDNSAnswer_PTR_TYPE(MDNSResponder::stcMDNSService& p_r

stcMDNS_RRDomain dnssdDomain;
stcMDNS_RRDomain serviceDomain;
stcMDNS_RRAttributes attributes(DNS_RRTYPE_PTR,
((p_rSendParameter.m_bCacheFlush ? 0x8000 : 0) | DNS_RRCLASS_IN)); // Cache flush? & INternet
stcMDNS_RRAttributes attributes(DNS_RRTYPE_PTR, DNS_RRCLASS_IN); // No cache flush! only INternet
//((p_rSendParameter.m_bCacheFlush ? 0x8000 : 0) | DNS_RRCLASS_IN)); // Cache flush? & INternet
bool bResult = ((_buildDomainForDNSSD(dnssdDomain)) && // _services._dns-sd._udp.local
(_writeMDNSRRDomain(dnssdDomain, p_rSendParameter)) &&
(_writeMDNSRRAttributes(attributes, p_rSendParameter)) && // TYPE & CLASS
Ex 5CB2 pand All @@ -1465,8 +1465,8 @@ bool MDNSResponder::_writeMDNSAnswer_PTR_NAME(MDNSResponder::stcMDNSService& p_r
MDNSResponder::stcMDNSSendParameter& p_rSendParameter) {
DEBUG_EX_INFO(DEBUG_OUTPUT.printf_P(PSTR("[MDNSResponder] _writeMDNSAnswer_PTR_NAME\n")););

stcMDNS_RRAttributes attributes(DNS_RRTYPE_PTR,
((p_rSendParameter.m_bCacheFlush ? 0x8000 : 0) | DNS_RRCLASS_IN)); // Cache flush? & INternet
stcMDNS_RRAttributes attributes(DNS_RRTYPE_PTR, DNS_RRCLASS_IN); // No cache flush! only INternet
//((p_rSendParameter.m_bCacheFlush ? 0x8000 : 0) | DNS_RRCLASS_IN)); // Cache flush? & INternet
bool bResult = ((_writeMDNSServiceDomain(p_rService, false, false, p_rSendParameter)) && // _http._tcp.local
(_writeMDNSRRAttributes(attributes, p_rSendParameter)) && // TYPE & CLASS
(_write32((p_rSendParameter.m_bUnannounce ? 0 : MDNS_SERVICE_TTL), p_rSendParameter)) && // TTL
Expand Down
0