mirror of
https://github.com/abh/geodns.git
synced 2026-04-27 03:45:53 +03:00
[GH-ISSUE #109] use a separate nameserver for subdomain #219
Labels
No labels
bug
bug
enhancement
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/geodns#219
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nclr on GitHub (Apr 29, 2018).
Original GitHub issue: https://github.com/abh/geodns/issues/109
This is probably obvious but I have trouble in setting a nameserver for subdomain (geo.< mydomain >.com).
My setup is this:
filename: < mydomain >.com
@abh commented on GitHub (Apr 29, 2018):
Yeah, that’s totally broken / not implemented! Thank you for noticing and reporting this.
It works if you do a NS lookup (explicitly) on “geo.com” (right?), but the code is completely missing the bits that recognizes the delegation.
Some notes, mostly from memory:
In
zones/reader.gothe code needs to notice the delegation (search fordns.TypeNS). Given an NS record on “sub” then when looking up “something.foo.sub” it has to figure out that “sub” is a delegation and serve the NS records.The obviously place to do this would be in
server/serve.gosomewhere just before we give up and serve NXDOMAIN, but that doesn’t catch lookups (other than NS) on “sub” itself. There’s a check forlen(m.Answer) == 0where this would go, but obviously duplicating this is a sign the code isn’t structured right for putting this in.I wanted to take out the _country and _status special cases. Taking them out might make the solution more obvious (basically have “no labelMatches” and “we ended up with no answers” branch into “is this a delegation?” before figuring out if it’s an NXDOMAIN or just a NOERROR with a SOA record).
If you work on it, the ‘dev’ branch is much ahead of master at the moment (and will soon get merged in as version 3.0).