Bug report
Since gh-88178 (a2104b7), :attr:~ipaddress.IPv6Address.exploded includes
the %scope_id suffix. IPv6Address._reverse_pointer derives the pointer
from self.exploded and only strips :, so the scope id is reversed into
the name:
>>> import ipaddress
>>> ipaddress.IPv6Address('fe80::1%eth0').reverse_pointer
'0.h.t.e.%.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa'
A scope id is link-local and is not part of the address, so it must not appear
in the reverse DNS name. The correct value is the one for fe80::1:
>>> ipaddress.IPv6Address('fe80::1').reverse_pointer
'1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa'
Before a2104b7 this raised :exc:~ipaddress.AddressValueError; it now returns
a malformed name silently.
Linked PRs
Bug report
Since gh-88178 (a2104b7), :attr:
~ipaddress.IPv6Address.explodedincludesthe
%scope_idsuffix.IPv6Address._reverse_pointerderives the pointerfrom
self.explodedand only strips:, so the scope id is reversed intothe name:
A scope id is link-local and is not part of the address, so it must not appear
in the reverse DNS name. The correct value is the one for
fe80::1:Before a2104b7 this raised :exc:
~ipaddress.AddressValueError; it now returnsa malformed name silently.
Linked PRs