cmd/tailscale/cli: do not allow turning Funnel on while shields-up (#7770)

This commit is contained in:
shayne
2023-04-04 22:20:27 -04:00
committed by GitHub
parent 7bfb7744b7
commit ba4e58f429
3 changed files with 21 additions and 0 deletions

View File

@@ -218,6 +218,11 @@ func (b *LocalBackend) SetServeConfig(config *ipn.ServeConfig) error {
b.mu.Lock()
defer b.mu.Unlock()
prefs := b.pm.CurrentPrefs()
if config.IsFunnelOn() && prefs.ShieldsUp() {
return errors.New("Unable to turn on Funnel while shields-up is enabled")
}
nm := b.netMap
if nm == nil {
return errors.New("netMap is nil")