network: Use RTNH_COMPARE_MASK in route_can_update() (#36585)

Let's only compare flags that can be set by userspace and not all flags.

Fixes a bug introduced by 7027cdbd79 (v256).
Fixes #36544
This commit is contained in:
Daan De Meyer
2025-03-04 05:00:33 +09:00
committed by GitHub
parent 047a4111df
commit 9fd25fd3ce
+1 -1
View File
@@ -1413,7 +1413,7 @@ bool route_can_update(const Route *existing, const Route *requesting) {
return false;
if (existing->type != requesting->type)
return false;
if (existing->flags != requesting->flags)
if ((existing->flags & ~RTNH_COMPARE_MASK) != (requesting->flags & ~RTNH_COMPARE_MASK))
return false;
if (!in6_addr_equal(&existing->prefsrc.in6, &requesting->prefsrc.in6))
return false;