Files
Jonathan Hui a2f000ddf8 [pktverify] fix IPv6 address parsing for IPv4-mapped addresses (#13461)
This commit fixes a parsing error in pktverify (Ipv6Addr) when
handling IPv4-mapped IPv6 addresses (e.g., 0:0:0:0:0:ffff:c0a8:d964).

Previously, Ipv6Addr.__init__ called Ipv6Addr._expand(addr)
(ipaddress.IPv6Address(addr).exploded), which returned IPv4-mapped
addresses formatted with dotted-quad IPv4 strings (e.g.,
0000:0000:0000:0000:0000:ffff:192.168.217.100). Bytes parsing methods
subsequently failed on the dotted-quad portion, causing tests such as
1_4_DNS_TC_5 to fail during packet verification.

This update uses ipaddress.IPv6Address(addr).packed to convert valid
IPv6 string representations directly into raw 16-byte arrays.
2026-07-31 21:19:53 -07:00
..