Skip to content
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

Not responding to "QU" questions #50

Closed
michaelosthege opened this issue Feb 26, 2019 · 2 comments
Closed

Not responding to "QU" questions #50

michaelosthege opened this issue Feb 26, 2019 · 2 comments

Comments

@michaelosthege
Copy link

@gaviriar and I discovered a problem with queries. A service was not responding to PTR queries issued by a Java client, while responding to PTR queries originating from a C# client that uses this library.

grafik

The corresponding log (awesome logging, by the way!) shows that all queries were received, but a response was only sent for the first:

grafik

Upon investgation with Wireshark, I found that the two libraries (this one vs. the Java alternative) issued different PTR queries:

grafik

So the Java library issued a QU question, as described in RFC6769 section 5.4:

To avoid large floods of potentially unnecessary responses in these
cases, Multicast DNS defines the top bit in the class field of a DNS
question as the unicast-response bit. When this bit is set in a
question, it indicates that the querier is willing to accept unicast
replies in response to this specific query, as well as the usual
multicast responses. These questions requesting unicast responses
are referred to as "QU" questions, to distinguish them from the more
usual questions requesting multicast responses ("QM" questions). A
Multicast DNS querier sending its initial batch of questions
immediately on wake from sleep or interface activation SHOULD set the
unicast-response bit in those questions.

As far as I can tell this is completely okay behavior by the Java client, but net-mdns should have responded.

Since the logger doesn't show any errors, I assume that the condition in ServiceDiscovery.cs#208 is fulfilled and this is some kind of parsing problem, @richardschneider ?

cheers

richardschneider added a commit that referenced this issue Mar 5, 2019
fix: process questions requesting unicast responses #50
@richardschneider
Copy link
Owner

@michaelosthege could you try the new build and see if #51 solves this issue.

Cheers

@michaelosthege
Copy link
Author

@richardschneider yes, I tested it with 0.16.1 from the CI build and it works!
Can you release it on NuGet then?

Thank you for fixing this so fast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants