summaryrefslogtreecommitdiffhomepage
path: root/wgengine/netstack/netstack.go
diff options
context:
space:
mode:
Diffstat (limited to 'wgengine/netstack/netstack.go')
-rw-r--r--wgengine/netstack/netstack.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/wgengine/netstack/netstack.go b/wgengine/netstack/netstack.go
index 1fe70134b..47c934b38 100644
--- a/wgengine/netstack/netstack.go
+++ b/wgengine/netstack/netstack.go
@@ -566,5 +566,7 @@ func startPacketCopy(ctx context.Context, cancel context.CancelFunc, dst net.Pac
}
func stringifyTEI(tei stack.TransportEndpointID) string {
- return fmt.Sprintf("%s:%v -> %s:%v", tei.LocalAddress, tei.LocalPort, tei.RemoteAddress, tei.RemotePort)
+ localHostPort := net.JoinHostPort(tei.LocalAddress.String(), strconv.Itoa(int(tei.LocalPort)))
+ remoteHostPort := net.JoinHostPort(tei.RemoteAddress.String(), strconv.Itoa(int(tei.RemotePort)))
+ return fmt.Sprintf("%s -> %s", remoteHostPort, localHostPort)
}