From 369f2735a098c571870e7dcfc2b6ed3ac6e30b04 Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Sun, 28 May 2023 13:52:17 +0800 Subject: [PATCH] Fix: linter fix --- listener/redir/tcp_freebsd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/listener/redir/tcp_freebsd.go b/listener/redir/tcp_freebsd.go index ada1c2a..6ecb249 100644 --- a/listener/redir/tcp_freebsd.go +++ b/listener/redir/tcp_freebsd.go @@ -46,7 +46,7 @@ func parserPacket(conn net.Conn) (socks5.Addr, error) { func getorigdst(fd uintptr) (netip.AddrPort, error) { addr := unix.RawSockaddrInet4{} size := uint32(unsafe.Sizeof(addr)) - _, _, err := syscall.Syscall6(syscall.SYS_GETSOCKOPT, fd, syscall.IPPROTO_IP, SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&addr)), uintptr(unsafe.Pointer(&size)), 0) + _, _, err := syscall.Syscall6(syscall.SYS_GETSOCKOPT, fd, syscall.IPPROTO_IP, SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&addr)), uintptr(unsafe.Pointer(&size)), 0) if err != 0 { return netip.AddrPort{}, err } @@ -57,7 +57,7 @@ func getorigdst(fd uintptr) (netip.AddrPort, error) { func getorigdst6(fd uintptr) (netip.AddrPort, error) { addr := unix.RawSockaddrInet6{} size := uint32(unsafe.Sizeof(addr)) - _, _, err := syscall.Syscall6(syscall.SYS_GETSOCKOPT, fd, syscall.IPPROTO_IPV6, IP6T_SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&addr)), uintptr(unsafe.Pointer(&size)), 0); + _, _, err := syscall.Syscall6(syscall.SYS_GETSOCKOPT, fd, syscall.IPPROTO_IPV6, IP6T_SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&addr)), uintptr(unsafe.Pointer(&size)), 0) if err != 0 { return netip.AddrPort{}, err }