-
Notifications
You must be signed in to change notification settings - Fork 7
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
Access client subnet in question #3
Comments
I'm not certain, but the flags required to work with EDNS0 are available, so I think you could construct a client subnet option manually and still use this library. If you're interested in that, let me know and I can try to work out an example. |
Thanks for the response. I am still trying to figure out where these flags are or would be using this package. This is the only package I've found that allows me to successfully return an answer. That part works; however, digging through the ServerRequest has proven quite difficult. All I can find in request is req.additional which doesn't have the subnet just an empty buffer. The test I'm using is simple:
Decoding the raw dgram query myself (with mafintosh/dns-packet) works but with this package I can't seem to figure out where the raw incoming message is. |
This was slicing off a zero-length buffer. Test with `dig @localhost -p 53 example.com +subnet=192.168.100.0/24` -> `00 08 00 07 00 01 18 00 c0 a8 64` Ref #3
This is the first I've looked at EDNS, and I'm only going off of RFCs, so bear with me please. Can you try the branch
which decodes (RFC 7871 section 6) to
Which looks right to me, although it's not in a very friendly format. I see mafintosh/dns-packet decodes this. By the way, I haven't had use for this library recently, so I haven't looked into making it support some important features like DNSSEC, EDNS, DNS-over-TLS and TCP fallback. Depending on how hard those are, I might look instead at a wasm build of a C DNS library. I'm confused how libbind-6, netresolv and bind9 relate now. In fossies I see "libbind provides the standard UNIX resolver library. Originally written for BIND 8, it was included in BIND 9 as optionally-compiled code through release 9.5 but is now provided as a separate package. At present, NetBSD maintains libbind code, now known as 'netresolv'." |
Using example query in dig 9.1+
Wondering if there is a way to do this without passing the datagram into something like dns-packet
Very cool and thanks!
The text was updated successfully, but these errors were encountered: