mirror of
https://github.com/tailscale/tailscale.git
synced 2025-05-30 19:28:32 +00:00
control/controlclient: remove Opts.KeepSharerAndUserSplit
It was added 2.5 years ago in c1dabd943674 but was never used. Clearly that migration didn't matter. We can attempt this again later if/when this matters. Meanwhile this simplifies the code and thus makes working on other current efforts in these parts of the code easier. Updates #1909 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
02b47d123f
commit
7dec09d169
@ -74,7 +74,6 @@ type Direct struct {
|
|||||||
discoPubKey key.DiscoPublic
|
discoPubKey key.DiscoPublic
|
||||||
getMachinePrivKey func() (key.MachinePrivate, error)
|
getMachinePrivKey func() (key.MachinePrivate, error)
|
||||||
debugFlags []string
|
debugFlags []string
|
||||||
keepSharerAndUserSplit bool
|
|
||||||
skipIPForwardingCheck bool
|
skipIPForwardingCheck bool
|
||||||
pinger Pinger
|
pinger Pinger
|
||||||
popBrowser func(url string) // or nil
|
popBrowser func(url string) // or nil
|
||||||
@ -126,10 +125,6 @@ type Options struct {
|
|||||||
// Status is called when there's a change in status.
|
// Status is called when there's a change in status.
|
||||||
Status func(Status)
|
Status func(Status)
|
||||||
|
|
||||||
// KeepSharerAndUserSplit controls whether the client
|
|
||||||
// understands Node.Sharer. If false, the Sharer is mapped to the User.
|
|
||||||
KeepSharerAndUserSplit bool
|
|
||||||
|
|
||||||
// SkipIPForwardingCheck declares that the host's IP
|
// SkipIPForwardingCheck declares that the host's IP
|
||||||
// forwarding works and should not be double-checked by the
|
// forwarding works and should not be double-checked by the
|
||||||
// controlclient package.
|
// controlclient package.
|
||||||
@ -255,7 +250,6 @@ func NewDirect(opts Options) (*Direct, error) {
|
|||||||
authKey: opts.AuthKey,
|
authKey: opts.AuthKey,
|
||||||
discoPubKey: opts.DiscoPublicKey,
|
discoPubKey: opts.DiscoPublicKey,
|
||||||
debugFlags: opts.DebugFlags,
|
debugFlags: opts.DebugFlags,
|
||||||
keepSharerAndUserSplit: opts.KeepSharerAndUserSplit,
|
|
||||||
netMon: opts.NetMon,
|
netMon: opts.NetMon,
|
||||||
skipIPForwardingCheck: opts.SkipIPForwardingCheck,
|
skipIPForwardingCheck: opts.SkipIPForwardingCheck,
|
||||||
pinger: opts.Pinger,
|
pinger: opts.Pinger,
|
||||||
@ -994,7 +988,6 @@ func (c *Direct) sendMapRequest(ctx context.Context, isStreaming bool, nu Netmap
|
|||||||
sess.logf = c.logf
|
sess.logf = c.logf
|
||||||
sess.vlogf = vlogf
|
sess.vlogf = vlogf
|
||||||
sess.machinePubKey = machinePubKey
|
sess.machinePubKey = machinePubKey
|
||||||
sess.keepSharerAndUserSplit = c.keepSharerAndUserSplit
|
|
||||||
|
|
||||||
// If allowStream, then the server will use an HTTP long poll to
|
// If allowStream, then the server will use an HTTP long poll to
|
||||||
// return incremental results. There is always one response right
|
// return incremental results. There is always one response right
|
||||||
|
@ -32,7 +32,6 @@ type mapSession struct {
|
|||||||
logf logger.Logf
|
logf logger.Logf
|
||||||
vlogf logger.Logf
|
vlogf logger.Logf
|
||||||
machinePubKey key.MachinePublic
|
machinePubKey key.MachinePublic
|
||||||
keepSharerAndUserSplit bool // see Options.KeepSharerAndUserSplit
|
|
||||||
|
|
||||||
// Fields storing state over the course of multiple MapResponses.
|
// Fields storing state over the course of multiple MapResponses.
|
||||||
lastNode *tailcfg.Node
|
lastNode *tailcfg.Node
|
||||||
@ -204,12 +203,8 @@ func (ms *mapSession) netmapForResponse(resp *tailcfg.MapResponse) *netmap.Netwo
|
|||||||
for _, peer := range resp.Peers {
|
for _, peer := range resp.Peers {
|
||||||
peer.InitDisplayNames(magicDNSSuffix)
|
peer.InitDisplayNames(magicDNSSuffix)
|
||||||
if !peer.Sharer.IsZero() {
|
if !peer.Sharer.IsZero() {
|
||||||
if ms.keepSharerAndUserSplit {
|
|
||||||
ms.addUserProfile(peer.Sharer)
|
|
||||||
} else {
|
|
||||||
peer.User = peer.Sharer
|
peer.User = peer.Sharer
|
||||||
}
|
}
|
||||||
}
|
|
||||||
ms.addUserProfile(peer.User)
|
ms.addUserProfile(peer.User)
|
||||||
}
|
}
|
||||||
if DevKnob.ForceProxyDNS() {
|
if DevKnob.ForceProxyDNS() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user