unmap IPv4-mapped IPv6 addresses (#4309)

This commit is contained in:
Thijs van Dien
2024-03-05 10:45:53 +01:00
committed by GitHub
parent 71f5ae5ecb
commit a70419b49f
2 changed files with 2 additions and 2 deletions

View File

@@ -221,7 +221,7 @@ func (c *oobConn) ReadPacket() (receivedPacket, error) {
// unsigned int ipi6_ifindex; /* send/recv interface index */
// };
if len(body) == 20 {
p.info.addr = netip.AddrFrom16(*(*[16]byte)(body[:16]))
p.info.addr = netip.AddrFrom16(*(*[16]byte)(body[:16])).Unmap()
p.info.ifIndex = binary.LittleEndian.Uint32(body[16:])
} else {
invalidCmsgOnceV6.Do(func() {