From nobody Fri Dec 19 07:43:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608304199; cv=none; d=zohomail.com; s=zohoarc; b=oB7pWfNLDnPF6uzYIBS6af6G1kFXu1hNxh+T2JhLOfx0hcaISLwsF9lvS2sk9VKIFUt/MJK6XxxVxYJXKL0GddOTjcZk09mLpRkCjH4wlUxVNcsw8xaXz9TuyXSIhv6dWomv7+5z+bFBmpuqW3nwiaI6BAOtizwpJpkPNLQ1baU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608304199; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=M5PPTAtkQCyvI5vlljAdfId4e8OD+gSKq6zzSUxm0YU=; b=ALDfsV2i3nnKr/2zd3K6GqwlNxXe/Fo8eyl4MMlBE4DXlgdMHSQz0OrDkOyljVphC5QCzht3Gzhf/kGKs4b9iBCGyabwxz/zX7J8IApYLThnRJI07mB3IaY+E92RcKFcIlX+KtuROqi2jqFHp9QcioDWUyjslgYDhecCQvdMdf4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1608304199062165.8412565937375; Fri, 18 Dec 2020 07:09:59 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-113-YZF7D8zMN8-ARDHszcgZDw-1; Fri, 18 Dec 2020 10:09:54 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1E818B810B; Fri, 18 Dec 2020 15:09:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED5C22CFB2; Fri, 18 Dec 2020 15:09:47 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B3A7F5002E; Fri, 18 Dec 2020 15:09:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0BIF9V61014102 for ; Fri, 18 Dec 2020 10:09:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 80734100238C; Fri, 18 Dec 2020 15:09:31 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.193.214]) by smtp.corp.redhat.com (Postfix) with ESMTP id E504F1002382 for ; Fri, 18 Dec 2020 15:09:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608304197; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=M5PPTAtkQCyvI5vlljAdfId4e8OD+gSKq6zzSUxm0YU=; b=dDnIJ1w4iNljK1hkJmYelS28w75BehHoh5a/3Gx1ysVWOe2LbvjYltb/SXQKKNhOEvJNbx OJDbSQwL6NMLbQ3lFGRGD84/F9eFTEbtyqzYtuR3H+KKIQ1NLcCXcAcALtC65EBqeCKaTQ XfOUG4HZ1SieptL7Cer5yHgj84E41uA= X-MC-Unique: YZF7D8zMN8-ARDHszcgZDw-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 09/10] networkGetDHCPLeases: Handle leases with infinite expiry time Date: Fri, 18 Dec 2020 16:09:15 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" 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=3D1908053 Fixes: 97a0aa246799c97d0a9ca9ecd6b4fd932ae4756c Signed-off-by: Michal Privoznik --- 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, } =20 /* Do not report expired lease */ - if (expirytime_tmp < currtime) + if (expirytime_tmp > 0 && expirytime_tmp < currtime) continue; =20 if (need_results) { --=20 2.26.2