From nobody Thu Dec 18 23:01:03 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.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=1639509009; cv=none; d=zohomail.com; s=zohoarc; b=Mtxi5xySO46v7YRUaLJgYoHOGWF2z85HU3sisTWQd5QAYF/LRQmdBQBJMc6vf1E7L4khCNyqTbstdElD9nIXMZQNQFXju9UjYBj6KQ3J7DkzqkbtPRAXnYIfGT1zyICTAf+QNUCzKIQJxGX+Nh7ZjRyjOpn72PQ+sD1iAeszO+Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639509009; 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=49oRmMPChshBqQswYNgy4SLud9cmL4mh3wZkJD5GoMA=; b=K++4E4ZU3IZhx4vz3zTylcJoRFBzrYLiyB1wrRUK5zcorhhPzXIRKLh0F81GXdQhh8nqlnV85KhOG+1Xi9PG3LcbsNWOrtFOEmO52UIcpKay2xYgU2qYI/JegGMma38DqdJK/xiYjvFcWf9JSZxC6sjiqumy8VWjsUZNxYryOg4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1639509009290831.2435327598577; Tue, 14 Dec 2021 11:10:09 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-21-HURwNhDcNW6RdrvbejZ5bA-1; Tue, 14 Dec 2021 14:10:06 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 10A1510168C6; Tue, 14 Dec 2021 19:10:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E1D0634B4B; Tue, 14 Dec 2021 19:09:59 +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 9ECD11806D2B; Tue, 14 Dec 2021 19:09:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1BEJ9srn000817 for ; Tue, 14 Dec 2021 14:09:54 -0500 Received: by smtp.corp.redhat.com (Postfix) id 46EAE18A4E; Tue, 14 Dec 2021 19:09:54 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id C1F81610A7 for ; Tue, 14 Dec 2021 19:09:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639509008; 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=49oRmMPChshBqQswYNgy4SLud9cmL4mh3wZkJD5GoMA=; b=IkJN27QIYle3jFYBHjw5pwnf/LXSPUN+IMdI/XranVPuS+xM8iyZgG/4SpsqbkU4EVCveu hfpD4GOICx7rXj8puvxfQRqpAdrbiumMswFWOcygXd5DoC9JmzLQP9/sgiD/s8xMiuJQ0Z Z54hsN6X9kgFl2E3YmATN2hrFJl6irk= X-MC-Unique: HURwNhDcNW6RdrvbejZ5bA-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 03/17] util: dnsmasq: mandate at least version 2.67 Date: Tue, 14 Dec 2021 20:09:19 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.84 on 10.5.11.23 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1639509011070100001 All the capabilities should be supported in 2.67. Make this the minimum version, since even the oldest distros we support have moved on: Debian 8: 2.72 CentOS 7: 2.76 Ubuntu 18.04: 2.79 Signed-off-by: J=C3=A1n Tomko --- src/util/virdnsmasq.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 90a1ea35b6..efe65174f8 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -49,6 +49,9 @@ VIR_LOG_INIT("util.dnsmasq"); #define DNSMASQ_HOSTSFILE_SUFFIX "hostsfile" #define DNSMASQ_ADDNHOSTSFILE_SUFFIX "addnhosts" =20 +#define DNSMASQ_MIN_MAJOR 2 +#define DNSMASQ_MIN_MINOR 67 + static void dhcphostFreeContent(dnsmasqDhcpHost *host) { @@ -627,6 +630,16 @@ dnsmasqCapsSetFromBuffer(dnsmasqCaps *caps, const char= *buf) if (virParseVersionString(p, &caps->version, true) < 0) goto error; =20 + if (caps->version / 1000000 < DNSMASQ_MIN_MAJOR || + caps->version % 1000000 < DNSMASQ_MIN_MINOR) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("dnsmasq version >=3D %u.%u required but %lu.%lu = found"), + DNSMASQ_MIN_MAJOR, DNSMASQ_MIN_MINOR, + caps->version / 1000000, + caps->version % 1000000); + goto error; + } + if (strstr(buf, "--bind-dynamic")) dnsmasqCapsSet(caps, DNSMASQ_CAPS_BIND_DYNAMIC); =20 --=20 2.31.1