mirror of
https://github.com/systemd/systemd
synced 2024-10-04 15:21:01 +00:00
network/route: fix condition in route_can_update()
An existing route with lifetime can be always updated with a new finite lifetime. As the comment in the code says, we cannot disable the lifetime. So, the condition must be '==', rather than '!='. Fixes #33210.
This commit is contained in:
parent
3523d28b97
commit
8b439af2c0
|
@ -1320,7 +1320,7 @@ bool route_can_update(const Route *existing, const Route *requesting) {
|
|||
return false;
|
||||
if (existing->pref != requesting->pref)
|
||||
return false;
|
||||
if (existing->expiration_managed_by_kernel && requesting->lifetime_usec != USEC_INFINITY)
|
||||
if (existing->expiration_managed_by_kernel && requesting->lifetime_usec == USEC_INFINITY)
|
||||
return false; /* We cannot disable expiration timer in the kernel. */
|
||||
if (!route_metric_can_update(&existing->metric, &requesting->metric, existing->expiration_managed_by_kernel))
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue