diff --git a/sys_conn_oob.go b/sys_conn_oob.go index 71a037d5..64d581c0 100644 --- a/sys_conn_oob.go +++ b/sys_conn_oob.go @@ -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() { diff --git a/sys_conn_oob_test.go b/sys_conn_oob_test.go index 40596421..a24480ab 100644 --- a/sys_conn_oob_test.go +++ b/sys_conn_oob_test.go @@ -235,7 +235,7 @@ var _ = Describe("OOB Conn Test", func() { Eventually(packetChan).Should(Receive(&p)) Expect(utils.IsIPv4(p.remoteAddr.(*net.UDPAddr).IP)).To(BeTrue()) Expect(p.info).To(Not(BeNil())) - Expect(p.info.addr.Is4In6() || p.info.addr.Is4()).To(BeTrue()) + Expect(p.info.addr.Is4()).To(BeTrue()) ip := p.info.addr.As4() Expect(net.IP(ip[:])).To(Equal(ip4.To4()))