mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-09 08:01:31 +00:00
net/netmon: always remember ifState as old state, even on minor changes
Otherwise you can get stuck finding minor ones nonstop. Fixes #15484 Change-Id: I7f98ac338c0b32ec1b9fdc47d053207b5fc1bf23 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
e720b9824e
commit
96fe8a6db6
@@ -441,7 +441,6 @@ func (m *Monitor) handlePotentialChange(newState *State, forceCallbacks bool) {
|
|||||||
delta.Major = m.IsMajorChangeFrom(oldState, newState)
|
delta.Major = m.IsMajorChangeFrom(oldState, newState)
|
||||||
if delta.Major {
|
if delta.Major {
|
||||||
m.gwValid = false
|
m.gwValid = false
|
||||||
m.ifState = newState
|
|
||||||
|
|
||||||
if s1, s2 := oldState.String(), delta.New.String(); s1 == s2 {
|
if s1, s2 := oldState.String(), delta.New.String(); s1 == s2 {
|
||||||
m.logf("[unexpected] network state changed, but stringification didn't: %v", s1)
|
m.logf("[unexpected] network state changed, but stringification didn't: %v", s1)
|
||||||
@@ -449,6 +448,7 @@ func (m *Monitor) handlePotentialChange(newState *State, forceCallbacks bool) {
|
|||||||
m.logf("[unexpected] new: %s", jsonSummary(newState))
|
m.logf("[unexpected] new: %s", jsonSummary(newState))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
m.ifState = newState
|
||||||
// See if we have a queued or new time jump signal.
|
// See if we have a queued or new time jump signal.
|
||||||
if timeJumped {
|
if timeJumped {
|
||||||
m.resetTimeJumpedLocked()
|
m.resetTimeJumpedLocked()
|
||||||
|
Reference in New Issue
Block a user