Skip to content

feat: Let an egress shard translate the NAT64 Well-Known Prefix - #28

Merged
privateip merged 1 commit into
mainfrom
feat/nat64-well-known-prefix
Oct 4, 2026
Merged

privateip merged 1 commit into
mainfrom
feat/nat64-well-known-prefix

Conversation

@privateip

Copy link
Copy Markdown
Collaborator

IPv6-only workloads that use a public DNS64 resolver get answers in the RFC 6052 Well-Known Prefix, which egress shards do not translate, so those connections blackhole. This adds an opt-in that lets a shard translate the Well-Known Prefix alongside its own NAT64 prefix, using the same IPv4 address. The opt-in is accepted only on shards that already do NAT64, and unlike the NAT64 prefix it can be turned off again, at the cost of blackholing destinations clients already resolved until their DNS TTLs expire. Status gains a matching field reporting whether the datapath is actually translating the Well-Known Prefix.

Test plan

  • Unit tests, build and golangci-lint pass; yamlfmt passes on all YAML
  • CRD and API reference docs regenerated
  • CI e2e: enabling the opt-in on a shard with no NAT64 prefix is rejected
  • CI e2e: the opt-in turns on and off on a NAT64 shard, and status accepts the reported value

Public DNS64 resolvers synthesize into the RFC 6052 Well-Known Prefix
64:ff9b::/96, but a shard translates only its Network-Specific Prefix, so
clients using those resolvers blackhole. nat64Prefix is write-once, so add a
separate opt-in rather than changing it.

Key changes:
- Add spec.translateWellKnownPrefix, a mutable boolean that additionally
  translates the WKP from the shard's IPv4 address; a CEL rule requires
  nat64Prefix when it is true
- Add status.translatesWellKnownPrefix reporting what the datapath programs
- Document that the WKP must not map non-global IPv4 (RFC 6052 3.1) and
  that disabling the flag blackholes already-resolved WKP destinations
  until DNS TTLs expire
- Cover the rule and the toggle in the e2e CEL test and the JSON keys in
  unit tests
@privateip
privateip requested a review from a team as a code owner October 4, 2026 11:39
@privateip
privateip requested a review from scotwells October 4, 2026 11:45
@privateip
privateip merged commit 8eebde6 into main Oct 4, 2026
6 checks passed
@privateip
privateip deleted the feat/nat64-well-known-prefix branch October 4, 2026 12:55
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.

2 participants