mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-07 00:34:42 +00:00
ipn/ipnlocal: advertise netstack to control server
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
2243bb48c2
commit
d6a95d807a
@ -682,6 +682,13 @@ func (b *LocalBackend) Start(opts ipn.Options) error {
|
|||||||
// let controlclient initialize it
|
// let controlclient initialize it
|
||||||
persistv = &persist.Persist{}
|
persistv = &persist.Persist{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isNetstack := wgengine.IsNetstackRouter(b.e)
|
||||||
|
debugFlags := controlDebugFlags
|
||||||
|
if isNetstack {
|
||||||
|
debugFlags = append([]string{"netstack"}, debugFlags...)
|
||||||
|
}
|
||||||
|
|
||||||
cc, err := controlclient.New(controlclient.Options{
|
cc, err := controlclient.New(controlclient.Options{
|
||||||
GetMachinePrivateKey: b.createGetMachinePrivateKeyFunc(),
|
GetMachinePrivateKey: b.createGetMachinePrivateKeyFunc(),
|
||||||
Logf: logger.WithPrefix(b.logf, "control: "),
|
Logf: logger.WithPrefix(b.logf, "control: "),
|
||||||
@ -693,12 +700,12 @@ func (b *LocalBackend) Start(opts ipn.Options) error {
|
|||||||
NewDecompressor: b.newDecompressor,
|
NewDecompressor: b.newDecompressor,
|
||||||
HTTPTestClient: httpTestClient,
|
HTTPTestClient: httpTestClient,
|
||||||
DiscoPublicKey: discoPublic,
|
DiscoPublicKey: discoPublic,
|
||||||
DebugFlags: controlDebugFlags,
|
DebugFlags: debugFlags,
|
||||||
LinkMonitor: b.e.GetLinkMonitor(),
|
LinkMonitor: b.e.GetLinkMonitor(),
|
||||||
|
|
||||||
// Don't warn about broken Linux IP forwading when
|
// Don't warn about broken Linux IP forwading when
|
||||||
// netstack is being used.
|
// netstack is being used.
|
||||||
SkipIPForwardingCheck: wgengine.IsNetstackRouter(b.e),
|
SkipIPForwardingCheck: isNetstack,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user