Find delegation from name (in zone object) #1084
Replies: 1 comment 1 reply
-
Dnspython's Zone implementations don't have any extra support for being an authoritative server, so the best you can do is to either go up from the name or down from the origin; I'd probably prefer the latter in most cases as (perhaps some IPv6 reverse zones excepted), delegation points are not usually very deep. Besides zonecuts, the other peril is that glue is not marked, so you could find an exact match say for |
Beta Was this translation helpful? Give feedback.
-
Given a dns.zone.Zone object with a bunch of NS RRsets (one of the apex, and others at certain delegations points), what's the best way to figure out the delegation NS records based on a name?
In other words, if the zone is example.com and has a delegation at foo.example.com, what's the quickest way to get this delegation when starting out e.g. from baz.bar.foo.example.com?
I know I can try to find an NS RRset at the name, and consecutively cut of one label until I find one (at the apex at the latest). But i figured that based on dnspython's internal data structures, there might be a more efficient way to do it.
It's like
zone_for_name
, except that the input is a zone object (as opposed to asking a resolver for SOA records).Beta Was this translation helpful? Give feedback.
All reactions