From nobody Sat May 4 23:42:50 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1568703855; cv=none; d=zoho.com; s=zohoarc; b=WBNa1r7f5/M3WSIMV4+ai7TGtFLvr2HMLUyNSYcTOyPik+iLwi99Y5ef6xYRJ7SEKZJaXo5Oq7m5xlyFOa8bxtUHTQO+bjKW60Link7cxug9WZfCb1sTdjHbRx8eRZgT+7TetSyFYlznFzOs/KGv+1GYy4R35P3BH5vnq0yWAOY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568703855; 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:ARC-Authentication-Results; bh=qXTLDvFRhwYfSGMILgq2OxhFlIzMIBWd13gkttZNK1E=; b=MDHcDKTVPp4tHU00zfdj52ma9g0fWTr9z8lweRM+YWeDPpgI+N4pE9qHfqvLHZ+JHpPLEhBmGTU+2aq7KBQYr8Yqaffk1nVON7agz3Bl28gwWxznkcvPNfyMuaKmKlxbOUh4nsRtFcdCd1k/oLqKtWHQ1Tqy1XYxJzh8eVuX7nE= ARC-Authentication-Results: i=1; mx.zoho.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 1568703855896628.9661113782377; Tue, 17 Sep 2019 00:04:15 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 74A9B3082138; Tue, 17 Sep 2019 07:04:12 +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 475686012C; Tue, 17 Sep 2019 07:04:12 +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 15A2618005A0; Tue, 17 Sep 2019 07:04:09 +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 x8H747iH013098 for ; Tue, 17 Sep 2019 03:04:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id A999A1001B28; Tue, 17 Sep 2019 07:04:07 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4D041001B20 for ; Tue, 17 Sep 2019 07:04:01 +0000 (UTC) Received: from mx04.anchor.net.au (mx04.anchor.net.au [202.4.234.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EDC698553A for ; Tue, 17 Sep 2019 07:03:59 +0000 (UTC) Received: from ogopogo.bridge.anchor.net.au (ogopogo.bridge.anchor.net.au [10.108.254.11]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx04.anchor.net.au (Postfix) with ESMTPS id 5C6A820799 for ; Tue, 17 Sep 2019 17:03:58 +1000 (AEST) Received: by ogopogo.bridge.anchor.net.au (Postfix, from userid 1000) id 0352ABFA93; Tue, 17 Sep 2019 17:03:58 +1000 (AEST) From: Michael Chapman To: libvir-list@redhat.com Date: Tue, 17 Sep 2019 17:03:56 +1000 Message-Id: <20190917070357.4424-2-mike@very.puzzling.org> In-Reply-To: <20190917070357.4424-1-mike@very.puzzling.org> References: <20190917070357.4424-1-mike@very.puzzling.org> MIME-Version: 1.0 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 238 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 17 Sep 2019 07:04:00 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 17 Sep 2019 07:04:00 +0000 (UTC) for IP:'202.4.234.228' DOMAIN:'mx04.anchor.net.au' HELO:'mx04.anchor.net.au' FROM:'mike@very.puzzling.org' RCPT:'' X-RedHat-Spam-Score: -0.7 (RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS) 202.4.234.228 mx04.anchor.net.au 202.4.234.228 mx04.anchor.net.au X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] util: fix byte order of port in virSocketAddrResolveService 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-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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 17 Sep 2019 07:04:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The ports in the socket address structures returned by getaddrinfo() are in network byte order. Convert to host byte order before returning them. Signed-off-by: Michael Chapman Reviewed-by: Daniel P. Berrang=C3=A9 --- src/util/virsocketaddr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c index c1fd5ec3d2..bba2089436 100644 --- a/src/util/virsocketaddr.c +++ b/src/util/virsocketaddr.c @@ -265,12 +265,12 @@ int virSocketAddrResolveService(const char *service) if (tmp->ai_family =3D=3D AF_INET) { struct sockaddr_in in; memcpy(&in, tmp->ai_addr, sizeof(in)); - port =3D in.sin_port; + port =3D ntohs(in.sin_port); goto cleanup; } else if (tmp->ai_family =3D=3D AF_INET6) { struct sockaddr_in6 in; memcpy(&in, tmp->ai_addr, sizeof(in)); - port =3D in.sin6_port; + port =3D ntohs(in.sin6_port); goto cleanup; } tmp++; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 23:42:50 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1568703855; cv=none; d=zoho.com; s=zohoarc; b=OOsErfekFINqtn9A6LSd1RDA/CdsrgqlO4q4/nlkwGAKWBlt50O77FuvIBKHjLga50mWbjo6FYy3iYxkMMPM29ykZhd6PBVh3JJaAcTSUL0q9iu9oipnFdlMDPTzXM3iY825oY+gfw9XkqpuYy19JNWaSSJo8ElzEmuj5UrM7DA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568703855; 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:ARC-Authentication-Results; bh=Gl+YeoojRxxFfmzZB6IzYUpuYwnkc8p33zAXXAhbJ5g=; b=LLsHFPehIMAxJcADh8KCp23xmX3szavA03G6IfNtbo1UzNEm9nsZN6hA6FbbaX7Hd7mY+S1StpqRWWsnj/h/ySJPC/CefOBTjVq3RsWPPDEW5wYTQ3VzwT2THD0zmzkmFsJ1VvbEG7QcEewZ3xV+JEm9bw/fmeYaNpqoR0NHl4s= ARC-Authentication-Results: i=1; mx.zoho.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 1568703855690312.3721223052819; Tue, 17 Sep 2019 00:04:15 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 49FFD308FC4B; Tue, 17 Sep 2019 07:04:12 +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 856705C1D8; Tue, 17 Sep 2019 07:04:11 +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 BC08D180085A; Tue, 17 Sep 2019 07:04:10 +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 x8H749sS013109 for ; Tue, 17 Sep 2019 03:04:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5D6D7100197A; Tue, 17 Sep 2019 07:04:09 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 58CB81001B01 for ; Tue, 17 Sep 2019 07:04:09 +0000 (UTC) Received: from mx04.anchor.net.au (mx04.anchor.net.au [202.4.234.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ED9CD37E88 for ; Tue, 17 Sep 2019 07:03:59 +0000 (UTC) Received: from ogopogo.bridge.anchor.net.au (ogopogo.bridge.anchor.net.au [10.108.254.11]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx04.anchor.net.au (Postfix) with ESMTPS id 37A3B20708 for ; Tue, 17 Sep 2019 17:03:58 +1000 (AEST) Received: by ogopogo.bridge.anchor.net.au (Postfix, from userid 1000) id 07F3BC0DA7; Tue, 17 Sep 2019 17:03:58 +1000 (AEST) From: Michael Chapman To: libvir-list@redhat.com Date: Tue, 17 Sep 2019 17:03:57 +1000 Message-Id: <20190917070357.4424-3-mike@very.puzzling.org> In-Reply-To: <20190917070357.4424-1-mike@very.puzzling.org> References: <20190917070357.4424-1-mike@very.puzzling.org> MIME-Version: 1.0 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 238 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 17 Sep 2019 07:04:08 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 17 Sep 2019 07:04:08 +0000 (UTC) for IP:'202.4.234.228' DOMAIN:'mx04.anchor.net.au' HELO:'mx04.anchor.net.au' FROM:'mike@very.puzzling.org' RCPT:'' X-RedHat-Spam-Score: -0.7 (RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS) 202.4.234.228 mx04.anchor.net.au 202.4.234.228 mx04.anchor.net.au X-Scanned-By: MIMEDefang 2.78 on 10.5.110.29 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] remote: fix registration of TLS socket 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-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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 17 Sep 2019 07:04:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Michael Chapman Reviewed-by: Daniel P. Berrang=C3=A9 --- src/remote/remote_daemon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index 966f3da2d0..7195ac9218 100644 --- a/src/remote/remote_daemon.c +++ b/src/remote/remote_daemon.c @@ -505,7 +505,7 @@ daemonSetupNetworking(virNetServerPtr srv, config->max_client_requests) < 0) goto cleanup; =20 - if (((ipsock && config->listen_tls) || (act && virSystemdActivationHas= Name(act, "ip-tls")))) { + if (((ipsock && config->listen_tls) || (act && virSystemdActivationHas= Name(act, DAEMON_NAME "-tls.socket")))) { virNetTLSContextPtr ctxt =3D NULL; =20 if (config->ca_file || --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list