|
|
|
@ -259,7 +259,8 @@ func updatePrefs(prefs, curPrefs *ipn.Prefs, env upCheckEnv) (simpleUp bool, jus
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
controlURLChanged := curPrefs.ControlURL != prefs.ControlURL
|
|
|
|
|
controlURLChanged := curPrefs.ControlURL != prefs.ControlURL &&
|
|
|
|
|
!(ipn.IsLoginServerSynonym(curPrefs.ControlURL) && ipn.IsLoginServerSynonym(prefs.ControlURL))
|
|
|
|
|
if controlURLChanged && env.backendState == ipn.Running.String() && !env.upArgs.forceReauth {
|
|
|
|
|
return false, nil, fmt.Errorf("can't change --login-server without --force-reauth")
|
|
|
|
|
}
|
|
|
|
@ -399,7 +400,7 @@ func runUp(ctx context.Context, args []string) error {
|
|
|
|
|
startLoginInteractive()
|
|
|
|
|
case ipn.NeedsMachineAuth:
|
|
|
|
|
printed = true
|
|
|
|
|
fmt.Fprintf(os.Stderr, "\nTo authorize your machine, visit (as admin):\n\n\t%s/admin/machines\n\n", upArgs.server)
|
|
|
|
|
fmt.Fprintf(os.Stderr, "\nTo authorize your machine, visit (as admin):\n\n\t%s\n\n", prefs.AdminPageURL())
|
|
|
|
|
case ipn.Starting, ipn.Running:
|
|
|
|
|
// Done full authentication process
|
|
|
|
|
if printed {
|
|
|
|
@ -608,7 +609,7 @@ func checkForAccidentalSettingReverts(newPrefs, curPrefs *ipn.Prefs, env upCheck
|
|
|
|
|
if reflect.DeepEqual(valCur, valNew) {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
if flagName == "login-server" && isLoginServerSynonym(valCur) && isLoginServerSynonym(valNew) {
|
|
|
|
|
if flagName == "login-server" && ipn.IsLoginServerSynonym(valCur) && ipn.IsLoginServerSynonym(valNew) {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
missing = append(missing, fmtFlagValueArg(flagName, valCur))
|
|
|
|
@ -657,10 +658,6 @@ func applyImplicitPrefs(prefs, oldPrefs *ipn.Prefs, curUser string) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func isLoginServerSynonym(val interface{}) bool {
|
|
|
|
|
return val == "https://login.tailscale.com" || val == "https://controlplane.tailscale.com"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func flagAppliesToOS(flag, goos string) bool {
|
|
|
|
|
switch flag {
|
|
|
|
|
case "netfilter-mode", "snat-subnet-routes":
|
|
|
|
|