Skip to content

Commit 6f6237a

Browse files
authored
Merge pull request espressif#813 from tanyanquan/master
fix(mdns): put srv/txt records in additional section for ptr queries
2 parents 18faeb3 + b7b8c5d commit 6f6237a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/mdns/mdns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,8 +1795,8 @@ static bool _mdns_create_answer_from_service(mdns_tx_packet_t *packet, mdns_serv
17951795
// According to RFC6763-section12.1, for DNS-SD, SRV, TXT and all address records
17961796
// should be included in additional records.
17971797
if (!_mdns_alloc_answer(&packet->answers, MDNS_TYPE_PTR, service, NULL, false, false) ||
1798-
!_mdns_alloc_answer(is_delegated ? &packet->additional : &packet->answers, MDNS_TYPE_SRV, service, NULL, send_flush, false) ||
1799-
!_mdns_alloc_answer(is_delegated ? &packet->additional : &packet->answers, MDNS_TYPE_TXT, service, NULL, send_flush, false) ||
1798+
!_mdns_alloc_answer(&packet->additional, MDNS_TYPE_SRV, service, NULL, send_flush, false) ||
1799+
!_mdns_alloc_answer(&packet->additional, MDNS_TYPE_TXT, service, NULL, send_flush, false) ||
18001800
!_mdns_alloc_answer((shared || is_delegated) ? &packet->additional : &packet->answers, MDNS_TYPE_A, service, host, send_flush,
18011801
false) ||
18021802
!_mdns_alloc_answer((shared || is_delegated) ? &packet->additional : &packet->answers, MDNS_TYPE_AAAA, service, host,

0 commit comments

Comments
 (0)