From nobody Thu Dec 18 04:27:57 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1522250336092560.2992398211727; Wed, 28 Mar 2018 08:18:56 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BD6577FD47; Wed, 28 Mar 2018 15:18:54 +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 841A118227; Wed, 28 Mar 2018 15:18:54 +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 4EBEB180BAD6; Wed, 28 Mar 2018 15:18:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SFIfZM014204 for ; Wed, 28 Mar 2018 11:18:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8013C6353C; Wed, 28 Mar 2018 15:18:41 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.91]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1155994581; Wed, 28 Mar 2018 15:18:40 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 28 Mar 2018 16:18:30 +0100 Message-Id: <20180328151832.7683-6-berrange@redhat.com> In-Reply-To: <20180328151832.7683-1-berrange@redhat.com> References: <20180328151832.7683-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/7] remote: use a separate connection for nwfilter APIs 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 28 Mar 2018 15:18:55 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: John Ferlan --- src/remote/remote_daemon.h | 1 + src/remote/remote_daemon_dispatch.c | 3 +++ src/rpc/gendispatch.pl | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/src/remote/remote_daemon.h b/src/remote/remote_daemon.h index 517eec1fc2..1b906401d3 100644 --- a/src/remote/remote_daemon.h +++ b/src/remote/remote_daemon.h @@ -77,6 +77,7 @@ struct daemonClientPrivate { virConnectPtr interfaceConn; virConnectPtr networkConn; virConnectPtr nodedevConn; + virConnectPtr nwfilterConn; =20 daemonClientStreamPtr streams; }; diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon= _dispatch.c index baa4f1eadc..dcfc0abf46 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -1746,6 +1746,8 @@ void remoteClientFree(void *data) virConnectClose(priv->networkConn); if (priv->nodedevConn) virConnectClose(priv->nodedevConn); + if (priv->nwfilterConn) + virConnectClose(priv->nwfilterConn); =20 VIR_FREE(priv); } @@ -1823,6 +1825,7 @@ remoteDispatchConnectOpen(virNetServerPtr server ATTR= IBUTE_UNUSED, priv->interfaceConn =3D virObjectRef(priv->conn); priv->networkConn =3D virObjectRef(priv->conn); priv->nodedevConn =3D virObjectRef(priv->conn); + priv->nwfilterConn =3D virObjectRef(priv->conn); =20 /* force update the @readonly attribute which was inherited from the * virNetServerService object - this is important for sockets that are= RW diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index 0e7567fbde..d8ab8b17dd 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -134,6 +134,9 @@ sub get_conn_arg { if ($type =3D~ /remote_nonnull_node_device/) { return "priv->nodedevConn"; } + if ($type =3D~ /remote_nonnull_nwfilter/) { + return "priv->nwfilterConn"; + } } =20 # This is for the few virConnect APIs that @@ -148,6 +151,9 @@ sub get_conn_arg { if ($proc =3D~ /Node.*Device/) { return "priv->nodedevConn"; } + if ($proc =3D~ /Connect.*NWFilter/) { + return "priv->nodedevConn"; + } =20 return "priv->conn"; } --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list