]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
conn: fix WinRingEndpoint.DstToString() for AF_INET endpoints jw/for-jason
authorJordan Whited <jordan@tailscale.com>
Fri, 21 Apr 2023 18:12:59 +0000 (11:12 -0700)
committerJordan Whited <jordan@tailscale.com>
Fri, 21 Apr 2023 18:12:59 +0000 (11:12 -0700)
Signed-off-by: Jordan Whited <jordan@tailscale.com>
conn/bind_windows.go

index 228167e39a2ace0f3ad7dca72dc0555c69374f27..d5095e004b04c79620440603aa3c8ef6f1f14fa3 100644 (file)
@@ -164,7 +164,7 @@ func (e *WinRingEndpoint) DstToBytes() []byte {
 func (e *WinRingEndpoint) DstToString() string {
        switch e.family {
        case windows.AF_INET:
-               netip.AddrPortFrom(netip.AddrFrom4(*(*[4]byte)(e.data[2:6])), binary.BigEndian.Uint16(e.data[0:2])).String()
+               return netip.AddrPortFrom(netip.AddrFrom4(*(*[4]byte)(e.data[2:6])), binary.BigEndian.Uint16(e.data[0:2])).String()
        case windows.AF_INET6:
                var zone string
                if scope := *(*uint32)(unsafe.Pointer(&e.data[22])); scope > 0 {