Git Product home page Git Product logo

Comments (3)

zbjornson avatar zbjornson commented on June 12, 2024

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.

from bindns.

aaronpeterson avatar aaronpeterson commented on June 12, 2024

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:

dig @localhost -p 5300 example.com +subnet=208.67.222.0/24

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.

from bindns.

zbjornson avatar zbjornson commented on June 12, 2024

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 zb/3 (with the commit e88cc12) please? With that branch, the dig example you gave yields an additional RR with

MessageRR {
    name: '.',
    type: 41,
    class: 4096,
    ttl: 0,
    rdata: [ <Buffer 00 08 00 07 00 01 18 00 d0 43 de> ]
}

which decodes (RFC 7871 section 6) to

  • OPTION-CODE 0x00 0x08
  • OPTION-LENGTH 0x00 0x07
  • FAMILY 0x00 0x01 (IPv4)
  • SOURCE PREFIX-LENGTH 0x18 (24 bits)
  • SCOPE PREFIX-LENGTH 0x00
  • ADDRESS 0xd0 0x43 0xde (208.67.222)

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'."

from bindns.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.