mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-06 09:55:46 +00:00
networkGetDHCPLeases: Handle leases with infinite expiry time
After v6.3.0-rc1~64 a lease can have infinite expiry time. This
means that the expiration time will appear as a value of zero.
Do the expiration check only if the expiration time is not zero.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1908053
Fixes: 97a0aa2467
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
5fb6d98c88
commit
5dd53684e1
@ -4131,7 +4131,7 @@ networkGetDHCPLeases(virNetworkPtr net,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Do not report expired lease */
|
/* Do not report expired lease */
|
||||||
if (expirytime_tmp < currtime)
|
if (expirytime_tmp > 0 && expirytime_tmp < currtime)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (need_results) {
|
if (need_results) {
|
||||||
|
Loading…
Reference in New Issue
Block a user