From eb49d35f654835e8f24be979f48530046abaf40b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:05:18 +0900 Subject: [PATCH] fix(udplite): nil raddr --- gold/p2p/udplite/lite.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gold/p2p/udplite/lite.go b/gold/p2p/udplite/lite.go index e0b3d53..b9daa29 100644 --- a/gold/p2p/udplite/lite.go +++ b/gold/p2p/udplite/lite.go @@ -48,9 +48,7 @@ func (sl *sysListener) listenUDP(ctx context.Context, laddr *net.UDPAddr) (*net. } sockladdr := sockaddrinterfaceinstance *(**net.UDPAddr)(unsafe.Add(unsafe.Pointer(&sockladdr), unsafe.Sizeof(uintptr(0)))) = laddr - sockraddr := sockaddrinterfaceinstance //nolint: ineffassign - *(**net.UDPAddr)(unsafe.Add(unsafe.Pointer(&sockraddr), unsafe.Sizeof(uintptr(0)))) = nil - fd, err := internetSocket(ctx, sl.network, sockladdr, sockraddr, syscall.SOCK_DGRAM, IPPROTO_UDPLITE, "listen", ctrlCtxFn) + fd, err := internetSocket(ctx, sl.network, sockladdr, nil, syscall.SOCK_DGRAM, IPPROTO_UDPLITE, "listen", ctrlCtxFn) if err != nil { return nil, err }