mirror of
https://github.com/tailscale/tailscale.git
synced 2025-07-31 00:03:47 +00:00
use net.JoinHostPort
Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
parent
6bb159d5fa
commit
cd4e7e51a7
@ -566,5 +566,7 @@ func startPacketCopy(ctx context.Context, cancel context.CancelFunc, dst net.Pac
|
|||||||
}
|
}
|
||||||
|
|
||||||
func stringifyTEI(tei stack.TransportEndpointID) string {
|
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)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user