control/controlclient, ipn/ipnlocal: unplumb a bool true literal opt

Updates #cleanup

Change-Id: I664f280a2e06b9875942458afcaf6be42a5e462a
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/9198/head
Brad Fitzpatrick 10 months ago committed by Brad Fitzpatrick
parent 346445acdd
commit f7b7ccf835

@ -69,7 +69,6 @@ type Direct struct {
clock tstime.Clock clock tstime.Clock
lastPrintMap time.Time lastPrintMap time.Time
newDecompressor func() (Decompressor, error) newDecompressor func() (Decompressor, error)
keepAlive bool
logf logger.Logf logf logger.Logf
netMon *netmon.Monitor // or nil netMon *netmon.Monitor // or nil
discoPubKey key.DiscoPublic discoPubKey key.DiscoPublic
@ -117,7 +116,6 @@ type Options struct {
Hostinfo *tailcfg.Hostinfo // non-nil passes ownership, nil means to use default using os.Hostname, etc Hostinfo *tailcfg.Hostinfo // non-nil passes ownership, nil means to use default using os.Hostname, etc
DiscoPublicKey key.DiscoPublic DiscoPublicKey key.DiscoPublic
NewDecompressor func() (Decompressor, error) NewDecompressor func() (Decompressor, error)
KeepAlive bool
Logf logger.Logf Logf logger.Logf
HTTPTestClient *http.Client // optional HTTP client to use (for tests only) HTTPTestClient *http.Client // optional HTTP client to use (for tests only)
NoiseTestClient *http.Client // optional HTTP client to use for noise RPCs (tests only) NoiseTestClient *http.Client // optional HTTP client to use for noise RPCs (tests only)
@ -253,7 +251,6 @@ func NewDirect(opts Options) (*Direct, error) {
clock: opts.Clock, clock: opts.Clock,
logf: opts.Logf, logf: opts.Logf,
newDecompressor: opts.NewDecompressor, newDecompressor: opts.NewDecompressor,
keepAlive: opts.KeepAlive,
persist: opts.Persist.View(), persist: opts.Persist.View(),
authKey: opts.AuthKey, authKey: opts.AuthKey,
discoPubKey: opts.DiscoPublicKey, discoPubKey: opts.DiscoPublicKey,
@ -863,7 +860,7 @@ func (c *Direct) sendMapRequest(ctx context.Context, isStreaming bool, nu Netmap
request := &tailcfg.MapRequest{ request := &tailcfg.MapRequest{
Version: tailcfg.CurrentCapabilityVersion, Version: tailcfg.CurrentCapabilityVersion,
KeepAlive: c.keepAlive, KeepAlive: true,
NodeKey: persist.PublicNodeKey(), NodeKey: persist.PublicNodeKey(),
DiscoKey: c.discoPubKey, DiscoKey: c.discoPubKey,
Endpoints: epStrs, Endpoints: epStrs,

@ -1440,7 +1440,6 @@ func (b *LocalBackend) Start(opts ipn.Options) error {
ServerURL: serverURL, ServerURL: serverURL,
AuthKey: opts.AuthKey, AuthKey: opts.AuthKey,
Hostinfo: hostinfo, Hostinfo: hostinfo,
KeepAlive: true,
NewDecompressor: b.newDecompressor, NewDecompressor: b.newDecompressor,
HTTPTestClient: httpTestClient, HTTPTestClient: httpTestClient,
DiscoPublicKey: discoPublic, DiscoPublicKey: discoPublic,

Loading…
Cancel
Save