]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: Use RTNH_COMPARE_MASK in route_can_update() (#36585)
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 3 Mar 2025 20:00:33 +0000 (21:00 +0100)
committerGitHub <noreply@github.com>
Mon, 3 Mar 2025 20:00:33 +0000 (05:00 +0900)
Let's only compare flags that can be set by userspace and not all flags.

Fixes a bug introduced by 7027cdbd79c26d5a8890759a37d70165c8aeb214 (v256).
Fixes #36544

src/network/networkd-route.c

index 9498fa4ccc8f2c82ae01312a2af4a73a73a4a886..cdc1f307af02e4f0cfb0fa0daa53234f7387e706 100644 (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;