Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverse_dns should also work for IPv6 prefixes != /128 #244

Open
Zugschlus opened this issue Apr 16, 2022 · 1 comment
Open

reverse_dns should also work for IPv6 prefixes != /128 #244

Zugschlus opened this issue Apr 16, 2022 · 1 comment

Comments

@Zugschlus
Copy link

Hi,

the reverse_dns method works properly to derive the full reverse DNS name for a given IPv6 address. However, when generating zone names for IPv6 reverse zones, shorter prefixes must be used. For example, reverse_dns(2001:db8:1:2:3:4:5::/64) and reverse_dns(2001:db8:1:2::/64) should both result in
2.0.0.0.1.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa and not
0.0.0.0.5.0.0.0.4.0.0.0.3.0.0.0.2.0.0.0.1.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa respective
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.1.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa.

The generation of the prefix should be cut once the prefix length is reached. Having a default of /128 is fine as this is by far the most common case.

If you're worried about preserving reverse_dns's backwards compatibility, please consider a new method reverse_dns_prefix or reverse_dns_delegation (although downstream software such as ansible would need to follow that).

Greetings
Marc

@jstasiak
Copy link
Contributor

@Zugschlus can you link to a relevant RFC or some other kind of documentation?

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

No branches or pull requests

2 participants