troglobit / mdnsd

Jeremie Miller's original mdnsd
BSD 3-Clause "New" or "Revised" License
56 stars 35 forks source link

Response contains a question section #2

Closed jgobuyan closed 6 years ago

jgobuyan commented 6 years ago

https://github.com/troglobit/mdnsd/blob/586f8cc44d9ece25bf0fb2cb70dbbc390f2b7055/libmdnsd/mdnsd.c#L605

Is this line supposed to be here? Query responses aren't supposed to have a question section.

troglobit commented 6 years ago

I have no idea, you're probably right. Care to whip up a pull request with a fix?

jgobuyan commented 6 years ago

After reading Section 6.7 of RFC6762, it looks like this is OK.

"This unicast response MUST be a conventional unicast response as would be generated by a conventional Unicast DNS server; for example, it MUST repeat the query ID and the question given in the query message."

troglobit commented 6 years ago

OK, good to know. Thank you for looking into this!

troglobit commented 6 years ago

Hi, I've recently picked up working on mdnsd again, much thanks to #6.

I've spent the last couple of days comparing the responses from different mDNS agents and by the looks of it your initial reaction must have been right. Because none of the other agents repeat the question.

troglobit commented 6 years ago

Gah, you're right of course ... I read section 6.7 again and realized I was thinking about multicast response. Got confused by a bug that triggered unicast responses, fixed in 8518bfb