From nobody Thu Dec 18 23:01:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1639509062; cv=none; d=zohomail.com; s=zohoarc; b=R2+pK5V5F3VPFFkfbo5z8+WoSL+LjJYCJvhDNK1luq/8/XYinSGnRIzx8a2uE8GZ1l0hvScEVthHci3okGjG7tB9i5DjpE+dOl0mxMNm0Gm1FJPDHjZANEn/mPIw8bFp7w7zNi7ZWXVtr3RjbhZ7ONKYVGZKh9MAE8pYWuxzZbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639509062; 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=wycHjyrWVMpAWs5VdS8tWeJBfuAb6JJec6zgWNsBNnY=; b=N1kAQLeK/7D3IjJGQVjMURozVaOkP8sQhrG6W45Dpe3nf/gxcW75JkYex9soBsHY0Q1l6VKZkbpdg5HauLEAMIiOmg8qjfrUwAnz70o0DrG+D8ud2jwIg7sdGvygN/0+YNSfj54Moy29tZdRu9S2rV+3ISu251N0Fz6gbSwEThs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1639509062603839.548796356914; Tue, 14 Dec 2021 11:11:02 -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-244-wlTUlerLN6GuG2yZbseRMg-1; Tue, 14 Dec 2021 14:10:58 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 66D98802E68; Tue, 14 Dec 2021 19:10:51 +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 08D1710AD788; Tue, 14 Dec 2021 19:10:51 +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 C43554A7CA; Tue, 14 Dec 2021 19:10:50 +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 1BEJAmkO001224 for ; Tue, 14 Dec 2021 14:10:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2F6CE610AE; Tue, 14 Dec 2021 19:10:48 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id A9C11610A7 for ; Tue, 14 Dec 2021 19:10:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1639509061; 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=wycHjyrWVMpAWs5VdS8tWeJBfuAb6JJec6zgWNsBNnY=; b=INckOybo5He7vtRDgTPZt7thFzkJQtWyhSNNCSM/HuWdji+b3g1+84PKH3IU9LGGlm12FF ieeDLu6FNwosC4ZrlBSsaQ0YvPpjMHCzjWSQRt0SRmKcFxpMboJAZ/n9QAYvjJGKKcGJSv mrxgakX+Qw73io26mBDnfkOP/hTqa64= X-MC-Unique: wlTUlerLN6GuG2yZbseRMg-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 09/17] util: dnsmasq: delete assumed capability flags Date: Tue, 14 Dec 2021 20:09:25 +0100 Message-Id: <3afa1b61b1a7be992a6ddd50051a4f7498c43577.1639508754.git.jtomko@redhat.com> 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.22 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: 1639509063215100001 Signed-off-by: J=C3=A1n Tomko --- src/util/virdnsmasq.c | 22 ++-------------------- src/util/virdnsmasq.h | 4 ---- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index efe65174f8..016d9d64a8 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -640,27 +640,9 @@ dnsmasqCapsSetFromBuffer(dnsmasqCaps *caps, const char= *buf) goto error; } =20 - if (strstr(buf, "--bind-dynamic")) - dnsmasqCapsSet(caps, DNSMASQ_CAPS_BIND_DYNAMIC); - - /* if this string is a part of the --version output, dnsmasq - * has been patched to use SO_BINDTODEVICE when listening, - * so that it will only accept requests that arrived on the - * listening interface(s) - */ - if (strstr(buf, "--bind-interfaces with SO_BINDTODEVICE")) - dnsmasqCapsSet(caps, DNSMASQ_CAPS_BINDTODEVICE); - - if (strstr(buf, "--ra-param")) - dnsmasqCapsSet(caps, DNSMASQ_CAPS_RA_PARAM); - - VIR_INFO("dnsmasq version is %d.%d, --bind-dynamic is %spresent, " - "SO_BINDTODEVICE is %sin use, --ra-param is %spresent", + VIR_INFO("dnsmasq version is %d.%d", (int)caps->version / 1000000, - (int)(caps->version % 1000000) / 1000, - dnsmasqCapsGet(caps, DNSMASQ_CAPS_BIND_DYNAMIC) ? "" : "NOT ", - dnsmasqCapsGet(caps, DNSMASQ_CAPS_BINDTODEVICE) ? "" : "NOT ", - dnsmasqCapsGet(caps, DNSMASQ_CAPS_RA_PARAM) ? "" : "NOT "); + (int)(caps->version % 1000000) / 1000); return 0; =20 error: diff --git a/src/util/virdnsmasq.h b/src/util/virdnsmasq.h index 9b8aeef226..9aa45c3046 100644 --- a/src/util/virdnsmasq.h +++ b/src/util/virdnsmasq.h @@ -68,10 +68,6 @@ typedef struct } dnsmasqContext; =20 typedef enum { - DNSMASQ_CAPS_BIND_DYNAMIC =3D 0, /* support for --bind-dynamic */ - DNSMASQ_CAPS_BINDTODEVICE =3D 1, /* uses SO_BINDTODEVICE for --bind-int= erfaces */ - DNSMASQ_CAPS_RA_PARAM =3D 2, /* support for --ra-param */ - DNSMASQ_CAPS_LAST, /* this must always be the last item */ } dnsmasqCapsFlags; =20 --=20 2.31.1