wgengine/netstack: hacky iperf loopback via quad-100

Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
Jordan Whited 2024-08-27 13:38:51 -07:00
parent a2c42d3cd4
commit 884f609262
No known key found for this signature in database
GPG Key ID: 33DF352F65991EB8

View File

@ -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))