Skip to content

Commit edfb2eb

Browse files
DaanDeMeyerbluca
authored andcommitted
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 7027cdb (v256). Fixes #36544 (cherry picked from commit 9fd25fd)
1 parent 11da527 commit edfb2eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/network/networkd-route.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ bool route_can_update(const Route *existing, const Route *requesting) {
14091409
return false;
14101410
if (existing->type != requesting->type)
14111411
return false;
1412-
if (existing->flags != requesting->flags)
1412+
if ((existing->flags & ~RTNH_COMPARE_MASK) != (requesting->flags & ~RTNH_COMPARE_MASK))
14131413
return false;
14141414
if (!in6_addr_equal(&existing->prefsrc.in6, &requesting->prefsrc.in6))
14151415
return false;

0 commit comments

Comments
 (0)