You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSD follows CNAME, DNAME, and possibly other data outside of the queried zone if the target zone is also configured in NSD. This may not always be desirable. This PR adds a configuration option and logic to disable this behavior. The option defaults to the current behavior.
@ IN SOA ns0.foo.test. username.foo.test. 0 0 0 0 0
cname-zone IN CNAME zone
cname-local IN CNAME local.bar.test.
cname-remote IN CNAME remote.biz.test.
zone A 127.0.0.1
bar.test.zone
@ IN SOA ns0.bar.test. username.bar.test. 0 0 0 0 0
local A 127.0.0.2
I'm open to suggestions on the option name (I took this one from bind although it appears to be obsoleted now). I also contemplated allowing zones/patterns to override the global setting but wasn't sure if calling zone_options_find in the query path was a good idea.
zones.
NSD currently returns additional information like cname resolution from
zones other than the query apex zone if the target zone is local. This
is not always desirable.
Hi @greg-bock! Thanks for the PR. Most of the code looks good, just two minor remarks.
I'd prefer you'd use dname_compare() instead of testing for pointer equality. While that'll work just fine for now, in the future there could be modifications that would invalidate the check.
The name additional-from-auth doesn't hold much value in NSD as it's an authoritative-only nameserver (bind had additional-from-cache too). Apart from that, as you stated, the option has been removed from bind in 9.12, which may cause some confusion. How about confine-to-zone: <yes|no>? That way the option can also just be initialized to 0.
I'll happily accept the changes once the issues have been resolved.
@greg-bock, sorry for the delay. I wanted to give the other committers a chance to react to the proposed changes. I'm assuming they're fine with the changes, so I'll go ahead and merge this. Squashing won't be necessary, GitHub allows me to squash the changes and combine them in a single commit. Thanks again!
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NSD follows CNAME, DNAME, and possibly other data outside of the queried zone if the target zone is also configured in NSD. This may not always be desirable. This PR adds a configuration option and logic to disable this behavior. The option defaults to the current behavior.
nsd.conf
foo.test.zone
bar.test.zone
Output:
With the PR changes and additional-from-auth set to no:
I'm open to suggestions on the option name (I took this one from bind although it appears to be obsoleted now). I also contemplated allowing zones/patterns to override the global setting but wasn't sure if calling zone_options_find in the query path was a good idea.