From ac2fe4ce92277023ff98d165484fb929590f4c86 Mon Sep 17 00:00:00 2001 From: Jordan Whited Date: Fri, 21 Apr 2023 11:12:59 -0700 Subject: [PATCH] conn: fix WinRingEndpoint.DstToString() for AF_INET endpoints Signed-off-by: Jordan Whited --- conn/bind_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conn/bind_windows.go b/conn/bind_windows.go index 228167e..d5095e0 100644 --- a/conn/bind_windows.go +++ b/conn/bind_windows.go @@ -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 {