mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-06 20:00:05 +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: 97a0aa246799c97d0a9ca9ecd6b4fd932ae4756c 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 */
|
||||
if (expirytime_tmp < currtime)
|
||||
if (expirytime_tmp > 0 && expirytime_tmp < currtime)
|
||||
continue;
|
||||
|
||||
if (need_results) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user