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:
Jonathan Nobels
2026-02-18 14:12:16 -05:00
committed by GitHub
parent 976aa940ec
commit 9acf22f9df

View File

@@ -201,12 +201,7 @@ func (cd *ChangeDelta) AnyInterfaceUp() bool {
if cd.new == nil {
return false
}
for _, ifi := range cd.new.Interface {
if ifi.IsUp() {
return true
}
}
return false
return cd.new.AnyInterfaceUp()
}
// isInterestingInterfaceChange reports whether any interfaces have changed in a meaningful way.