mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
ipn/ipnlocal: call checkPrefs in Start too
We were not calling checkPrefs on `opts.*Prefs` in (*LocalBackend).Start(). Updates #713 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
parent
41dd49391f
commit
18c7c3981a
@ -1122,6 +1122,17 @@ func (b *LocalBackend) Start(opts ipn.Options) error {
|
||||
}
|
||||
|
||||
b.mu.Lock()
|
||||
if opts.UpdatePrefs != nil {
|
||||
if err := b.checkPrefsLocked(opts.UpdatePrefs); err != nil {
|
||||
b.mu.Unlock()
|
||||
return err
|
||||
}
|
||||
} else if opts.LegacyMigrationPrefs != nil {
|
||||
if err := b.checkPrefsLocked(opts.LegacyMigrationPrefs); err != nil {
|
||||
b.mu.Unlock()
|
||||
return err
|
||||
}
|
||||
}
|
||||
profileID := b.pm.CurrentProfile().ID
|
||||
|
||||
// The iOS client sends a "Start" whenever its UI screen comes
|
||||
|
@ -272,6 +272,7 @@ func TestShouldProcessInbound(t *testing.T) {
|
||||
pkt *packet.Parsed
|
||||
setup func(*Impl)
|
||||
want bool
|
||||
runOnGOOS string
|
||||
}{
|
||||
{
|
||||
name: "ipv6-via",
|
||||
@ -350,6 +351,7 @@ func TestShouldProcessInbound(t *testing.T) {
|
||||
})
|
||||
},
|
||||
want: true,
|
||||
runOnGOOS: "linux",
|
||||
},
|
||||
{
|
||||
name: "tailscale-ssh-disabled",
|
||||
@ -443,6 +445,9 @@ func TestShouldProcessInbound(t *testing.T) {
|
||||
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
if tc.runOnGOOS != "" && runtime.GOOS != tc.runOnGOOS {
|
||||
t.Skipf("skipping on GOOS=%v", runtime.GOOS)
|
||||
}
|
||||
impl := makeNetstack(t, func(i *Impl) {
|
||||
defer t.Logf("netstack setup finished")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user