ipn/ipnlocal: don't send an empty BrowseToURL w/ WatchIPNBus NotifyInitialState

I noticed this while working on the following fix to #11962.

Updates #11962

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: I4c5894d8899d1ae8c42f54ecfd4d05a4a7ac598c
This commit is contained in:
Brad Fitzpatrick 2024-05-06 14:09:13 -07:00 committed by Brad Fitzpatrick
parent e26f76a1c4
commit aadb8d9d21

View File

@ -2252,7 +2252,7 @@ func (b *LocalBackend) WatchNotifications(ctx context.Context, mask ipn.NotifyWa
if mask&ipn.NotifyInitialState != 0 {
ini.SessionID = sessionID
ini.State = ptr.To(b.state)
if b.state == ipn.NeedsLogin {
if b.state == ipn.NeedsLogin && b.authURLSticky != "" {
ini.BrowseToURL = ptr.To(b.authURLSticky)
}
}