mirror of https://github.com/Dreamacro/clash.git
Fix: linter fix
This commit is contained in:
parent
2b6dd2a909
commit
369f2735a0
|
@ -46,7 +46,7 @@ func parserPacket(conn net.Conn) (socks5.Addr, error) {
|
||||||
func getorigdst(fd uintptr) (netip.AddrPort, error) {
|
func getorigdst(fd uintptr) (netip.AddrPort, error) {
|
||||||
addr := unix.RawSockaddrInet4{}
|
addr := unix.RawSockaddrInet4{}
|
||||||
size := uint32(unsafe.Sizeof(addr))
|
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 {
|
if err != 0 {
|
||||||
return netip.AddrPort{}, err
|
return netip.AddrPort{}, err
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ func getorigdst(fd uintptr) (netip.AddrPort, error) {
|
||||||
func getorigdst6(fd uintptr) (netip.AddrPort, error) {
|
func getorigdst6(fd uintptr) (netip.AddrPort, error) {
|
||||||
addr := unix.RawSockaddrInet6{}
|
addr := unix.RawSockaddrInet6{}
|
||||||
size := uint32(unsafe.Sizeof(addr))
|
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 {
|
if err != 0 {
|
||||||
return netip.AddrPort{}, err
|
return netip.AddrPort{}, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue