Skip to content

proxy: use WAN DNS for managed DNS64 - #172

Merged
Cd1s merged 1 commit into
mainfrom
fix/nat46-dns64-upstream
Oct 25, 2026
Merged

Cd1s merged 1 commit into
mainfrom
fix/nat46-dns64-upstream

Conversation

@Cd1s

@Cd1s Cd1s commented Oct 25, 2026

Copy link
Copy Markdown
Owner

What

  • Make managed DNS64 follow WAN/provider resolvers independently of the LAN dns.upstream mode.
  • Prefer the current WAN resolver file, then WAN lease DNS records, dns.fallback, and finally configured dns.servers; ignore loopback and unspecified IPv4 addresses.
  • Keep DNS64 synchronization active for manual, DoT, and ISP LAN DNS modes.
  • Make NAT46 defaults usage-time only so legacy configurations keep their canonical YAML and do not produce false config.unapplied doctor findings.
  • Add regression coverage for all LAN DNS modes, legacy canonical config, filtered upstreams, and the lab DNS64 path.

Why

Routers using dns.upstream: manual often reserve dns.servers for a local DNS service such as 127.0.0.1#5455. Node DNS64 must use the provider DNS learned from WAN leases regardless of how LAN clients resolve names. Filling NAT46 defaults into the in-memory config also made untouched legacy configurations appear to have unapplied changes after upgrade.

Verification

  • cd mr && go vet ./...
  • cd mr && go test -count=1 ./...
  • sh tools/ci.sh — ALL CHECKS PASSED
  • sh tools/lab/scenarios/10-proxy-nat46-dns64.sh 1 — ISP A record and managed DNS64 AAAA synthesis passed
  • Lab output: Address: 64:ff9b::cb00:7107
  • Lab 1 was cleaned up with lab.sh down 1.

@Cd1s
Cd1s merged commit 749d8ea into main Oct 25, 2026
2 checks passed
@Cd1s
Cd1s deleted the fix/nat46-dns64-upstream branch October 25, 2026 13:26
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.

1 participant