mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 23:15:37 +00:00
mDNS: authority section of probe message needs to contain all records
see RFC 6762 section 8.2: for tiebreaking to work correctly in all cases, the Authority section must contain all the records and proposed rdata being probed for uniqueness.
This commit is contained in:
parent
3043d9d023
commit
c4321330d0
@ -917,13 +917,14 @@ mdns_send_probe(struct netif* netif, const ip_addr_t *destination)
|
||||
/* Add answers to the questions above into the authority section for tiebreaking */
|
||||
#if LWIP_IPV4
|
||||
if (!ip4_addr_isany_val(*netif_ip4_addr(netif))) {
|
||||
pkt.host_replies = REPLY_HOST_A;
|
||||
outmsg.host_replies = REPLY_HOST_A | REPLY_HOST_PTR_V4;
|
||||
}
|
||||
#endif
|
||||
#if LWIP_IPV6
|
||||
for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; i++) {
|
||||
if (ip6_addr_isvalid(netif_ip6_addr_state(netif, i))) {
|
||||
pkt.host_replies |= REPLY_HOST_AAAA;
|
||||
outmsg.host_replies |= REPLY_HOST_AAAA | REPLY_HOST_PTR_V6;
|
||||
outmsg.host_reverse_v6_replies |= (1 << i);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -931,7 +932,8 @@ mdns_send_probe(struct netif* netif, const ip_addr_t *destination)
|
||||
for (i = 0; i < MDNS_MAX_SERVICES; i++) {
|
||||
struct mdns_service *serv = mdns->services[i];
|
||||
if (serv) {
|
||||
pkt.serv_replies[i] = REPLY_SERVICE_SRV | REPLY_SERVICE_TXT;
|
||||
outmsg.serv_replies[i] = REPLY_SERVICE_SRV | REPLY_SERVICE_TXT
|
||||
| REPLY_SERVICE_TYPE_PTR | REPLY_SERVICE_NAME_PTR;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user