File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -878,17 +878,17 @@ func (ns *Impl) acceptTCP(r *tcp.ForwarderRequest) {
878
878
clientRemoteAddrPort := netip .AddrPortFrom (clientRemoteIP , clientRemotePort )
879
879
880
880
dialIP := netaddrIPFromNetstackIP (reqDetails .LocalAddress )
881
- isTailscaleIP := tsaddr . IsTailscaleIP (dialIP )
881
+ isLocal := ns . isLocalIP (dialIP )
882
882
883
883
dstAddrPort := netip .AddrPortFrom (dialIP , reqDetails .LocalPort )
884
884
885
885
if viaRange .Contains (dialIP ) {
886
- isTailscaleIP = false
886
+ isLocal = false
887
887
dialIP = tsaddr .UnmapVia (dialIP )
888
888
}
889
889
890
890
defer func () {
891
- if ! isTailscaleIP {
891
+ if ! isLocal {
892
892
// if this is a subnet IP, we added this in before the TCP handshake
893
893
// so netstack is happy TCP-handshaking as a subnet IP
894
894
ns .removeSubnetAddress (dialIP )
@@ -975,7 +975,7 @@ func (ns *Impl) acceptTCP(r *tcp.ForwarderRequest) {
975
975
return
976
976
}
977
977
}
978
- if isTailscaleIP {
978
+ if isLocal {
979
979
dialIP = netaddr .IPv4 (127 , 0 , 0 , 1 )
980
980
}
981
981
dialAddr := netip .AddrPortFrom (dialIP , uint16 (reqDetails .LocalPort ))
You can’t perform that action at this time.
0 commit comments