Skip to content

Commit

Permalink
fix(udplite): nil raddr
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Jul 18, 2024
1 parent 60a98e4 commit eb49d35
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions gold/p2p/udplite/lite.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit eb49d35

Please sign in to comment.