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(a)redhat.com>
---
src/network/bridge_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index fcc7e05ad8..22d7d330a3 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -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) {
--
2.26.2