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

Support mDNS #8

Open
iankressin opened this issue Feb 18, 2021 · 4 comments
Open

Support mDNS #8

iankressin opened this issue Feb 18, 2021 · 4 comments

Comments

@iankressin
Copy link

I'm currently using this lib to discovery peers in the local network using mDNS, and the queries are basically DNS queries.

But every now and then the following error shows up in the console:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: QClass(32769)', src/udp_server.rs:60:57
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

which is probably due to QClass(32769):

As noted in [RFC6762], Multicast DNS can only carry DNS records with classes in the range 0-32767.
Classes in the range 32768 to 65535 are incompatible with Multicast DNS.

This error could be handled internally, but I wonder if it's possible and makes sense to the project to add the support for mDNS within dns_message_parser. If it do, I'll be glad to help.

@LinkTed
Copy link
Owner

LinkTed commented Feb 18, 2021

This is because, each QClass number is mapped to a specific variant in the enum QClass. If there is no mapping for the number then an error is returned. I have to think how to handle it better if there is no mapping for the number.

@iankressin
Copy link
Author

@LinkTed thanks for the quick response.

Let me know if you need any help with code or testing.

@LinkTed
Copy link
Owner

LinkTed commented Feb 20, 2021

@iankressin could you print the DNS message, where you get this error message?

@iankressin
Copy link
Author

@LinkTed actually, this is the only info that I've got. I'm not the one sending this message, is some other device in my network

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