netmon: use State AnyInterfaceUp in ChangeDelta (#18752)
fixes tailscale/corp#37048 We're duplicating logic in AnyInterfaceUp in the ChangeDelta and we're duplicating it wrong. The new State has the logic for this based on the HaveV6 and HaveV4 flags. Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
This commit is contained in:
@@ -201,12 +201,7 @@ func (cd *ChangeDelta) AnyInterfaceUp() bool {
|
|||||||
if cd.new == nil {
|
if cd.new == nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
for _, ifi := range cd.new.Interface {
|
return cd.new.AnyInterfaceUp()
|
||||||
if ifi.IsUp() {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// isInterestingInterfaceChange reports whether any interfaces have changed in a meaningful way.
|
// isInterestingInterfaceChange reports whether any interfaces have changed in a meaningful way.
|
||||||
|
|||||||
Reference in New Issue
Block a user