MCPcopy Index your code
hub / github.com/tailscale/tailscale / IsNetstackRouter

Method IsNetstackRouter

tsd/tsd.go:177–182  ·  view source on GitHub ↗

IsNetstackRouter reports whether Tailscale is either fully netstack based (without TUN) or is at least using netstack for routing.

()

Source from the content-addressed store, hash-verified

175// IsNetstackRouter reports whether Tailscale is either fully netstack based
176// (without TUN) or is at least using netstack for routing.
177func (s *System) IsNetstackRouter() bool {
178 if v, ok := s.NetstackRouter.GetOK(); ok && v {
179 return true
180 }
181 return s.IsNetstack()
182}
183
184// IsNetstack reports whether Tailscale is running as a netstack-based TUN-free engine.
185func (s *System) IsNetstack() bool {

Callers 7

TestIsNetstackRouterFunction · 0.95
controlDebugFlagsMethod · 0.80
startLockedMethod · 0.80
CheckIPForwardingMethod · 0.80
CheckUDPGROForwardingMethod · 0.80
SetUDPGROForwardingMethod · 0.80

Calls 2

IsNetstackMethod · 0.95
GetOKMethod · 0.80

Tested by 1

TestIsNetstackRouterFunction · 0.76