Closed ErwanMAS closed 4 years ago
This mechanism is described in RFC 6762 7.1 as Known-Answer Suppression.
A Multicast DNS responder MUST NOT answer a Multicast DNS query if the answer it would give is already included in the Answer Section with an RR TTL at least half the correct value.
Do you have any reference that the responder always has to respond with a message including its own local service, even though the answer is already in the Answer Section?
i dont have more insight, or test case , you can close , if you want .
My last version run only with my pull request ( #12 )
I use this package to manage some hardware , my source is her https://github.com/ErwanMAS/godfrey4home/blob/master/src/homekit-switch.go .
After registration , and a long time . When i restart , the bridge , my iphone can not reconnect to the hk bridge .
I ran some tcpdump on 5353 , and i saw that the phone always made a query on _hap._tcp.local. PTR .
The mdns hc bridge provide by /brutella/hc/ , does not reply , with a answer .
If i comment this line , i have what i think the good behavior, the bridge reply with a response to himself .
https://github.com/brutella/dnssd/blob/61d1bc6e53ace5b3d9ecb46ffd0b3158c00ae9d0/responder.go#L437
I think the object req.msg.Answer , must not store answers from his own local services .