From 884f609262f6d8e21da4da1c523f23e272a27ac4 Mon Sep 17 00:00:00 2001 From: Jordan Whited Date: Tue, 27 Aug 2024 13:38:51 -0700 Subject: [PATCH] wgengine/netstack: hacky iperf loopback via quad-100 Signed-off-by: Jordan Whited --- wgengine/netstack/netstack.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wgengine/netstack/netstack.go b/wgengine/netstack/netstack.go index 01af13b09..4c00511e0 100644 --- a/wgengine/netstack/netstack.go +++ b/wgengine/netstack/netstack.go @@ -724,7 +724,7 @@ func (ns *Impl) handleLocalPackets(p *packet.Parsed, t *tstun.Wrapper) filter.Re // 80, and 8080. switch p.IPProto { case ipproto.TCP: - if port := p.Dst.Port(); port != 53 && port != 80 && port != 8080 { + if port := p.Dst.Port(); port != 53 && port != 80 && port != 8080 && port != 5201 { return filter.Accept } case ipproto.UDP: @@ -1300,7 +1300,7 @@ func (ns *Impl) acceptTCP(r *tcp.ForwarderRequest) { return } } - if isTailscaleIP { + if isTailscaleIP || (hittingServiceIP && reqDetails.LocalPort == 5201) { dialIP = netaddr.IPv4(127, 0, 0, 1) } dialAddr := netip.AddrPortFrom(dialIP, uint16(reqDetails.LocalPort))