Skip to content

feat(secondary): add fallthrough support#8041

Merged
yongtang merged 1 commit into
coredns:masterfrom
thevilledev:feat/secondary-fall
May 20, 2026
Merged

feat(secondary): add fallthrough support#8041
yongtang merged 1 commit into
coredns:masterfrom
thevilledev:feat/secondary-fall

Conversation

@thevilledev

@thevilledev thevilledev commented Apr 11, 2026

Copy link
Copy Markdown
Collaborator

1. Why is this pull request needed and what does it do?

Allow the secondary plugin to pass NXDOMAIN queries to the next plugin in the chain, enabling split DNS setups where a transferred zone contains only partial records.

The file.File ServeDNS method already checks Fall.Through on NXDOMAIN, but secondaryParse never exposed the directive. This adds parsing for fallthrough [ZONES...] following the same pattern used by file, hosts, and kubernetes plugins.

Example:

example.org {
    secondary {
        transfer from 10.0.1.1
        fallthrough
    }
    forward . 8.8.8.8
}

Records in the transferred zone are served authoritatively and NXDOMAIN queries fall through to the forward plugin.

2. Which issues (if any) are related?

Fixes #8017

3. Which documentation changes (if any) need to be made?

Includes plugin documentation update for the secondary plugin.

4. Does this introduce a backward incompatible change or deprecation?

No, this is opt-in. Without the fallthrough directive, the fall.F zero value means Through() always returns false. Existing configurations are unaffected.

Allow the secondary plugin to pass NXDOMAIN queries to the
next plugin in the chain, enabling split DNS setups where
a transferred zone contains only partial records.

The file.File ServeDNS method already checks Fall.Through on
NXDOMAIN, but secondaryParse never exposed the directive.
This adds parsing for 'fallthrough [ZONES...]' following the
same pattern used by file, hosts, and kubernetes plugins.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
@yongtang yongtang merged commit f8dffa7 into coredns:master May 20, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow fallthrough for secondary plugin

2 participants