@ -32,7 +32,6 @@ import (
"gvisor.dev/gvisor/pkg/tcpip/transport/tcp"
"gvisor.dev/gvisor/pkg/tcpip/transport/tcp"
"gvisor.dev/gvisor/pkg/tcpip/transport/udp"
"gvisor.dev/gvisor/pkg/tcpip/transport/udp"
"gvisor.dev/gvisor/pkg/waiter"
"gvisor.dev/gvisor/pkg/waiter"
"tailscale.com/drive"
"tailscale.com/envknob"
"tailscale.com/envknob"
"tailscale.com/ipn/ipnlocal"
"tailscale.com/ipn/ipnlocal"
"tailscale.com/metrics"
"tailscale.com/metrics"
@ -186,7 +185,6 @@ type Impl struct {
ctxCancel context . CancelFunc // called on Close
ctxCancel context . CancelFunc // called on Close
lb * ipnlocal . LocalBackend // or nil
lb * ipnlocal . LocalBackend // or nil
dns * dns . Manager
dns * dns . Manager
driveForLocal drive . FileSystemForLocal // or nil
// loopbackPort, if non-nil, will enable Impl to loop back (dnat to
// loopbackPort, if non-nil, will enable Impl to loop back (dnat to
// <address-family-loopback>:loopbackPort) TCP & UDP flows originally
// <address-family-loopback>:loopbackPort) TCP & UDP flows originally
@ -288,7 +286,7 @@ func setTCPBufSizes(ipstack *stack.Stack) error {
}
}
// Create creates and populates a new Impl.
// Create creates and populates a new Impl.
func Create ( logf logger . Logf , tundev * tstun . Wrapper , e wgengine . Engine , mc * magicsock . Conn , dialer * tsdial . Dialer , dns * dns . Manager , pm * proxymap . Mapper , driveForLocal drive . FileSystemForLocal ) ( * Impl , error ) {
func Create ( logf logger . Logf , tundev * tstun . Wrapper , e wgengine . Engine , mc * magicsock . Conn , dialer * tsdial . Dialer , dns * dns . Manager , pm * proxymap . Mapper ) ( * Impl , error ) {
if mc == nil {
if mc == nil {
return nil , errors . New ( "nil magicsock.Conn" )
return nil , errors . New ( "nil magicsock.Conn" )
}
}
@ -382,7 +380,6 @@ func Create(logf logger.Logf, tundev *tstun.Wrapper, e wgengine.Engine, mc *magi
connsInFlightByClient : make ( map [ netip . Addr ] int ) ,
connsInFlightByClient : make ( map [ netip . Addr ] int ) ,
packetsInFlight : make ( map [ stack . TransportEndpointID ] struct { } ) ,
packetsInFlight : make ( map [ stack . TransportEndpointID ] struct { } ) ,
dns : dns ,
dns : dns ,
driveForLocal : driveForLocal ,
}
}
loopbackPort , ok := envknob . LookupInt ( "TS_DEBUG_NETSTACK_LOOPBACK_PORT" )
loopbackPort , ok := envknob . LookupInt ( "TS_DEBUG_NETSTACK_LOOPBACK_PORT" )
if ok && loopbackPort >= 0 && loopbackPort <= math . MaxUint16 {
if ok && loopbackPort >= 0 && loopbackPort <= math . MaxUint16 {