From nobody Mon Feb 2 09:26:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1768289841; cv=none; d=zohomail.com; s=zohoarc; b=gm1up7vgkmOyAnAnmj2XyyY7cP17LV+X+4j0woP2BSsB4E3zGoiYKJ8sAhUSI6nXJiXjUUdDARWwoOs3ZmEKZuCZ1QH5ESSLYyWIfQLLYQAo4tkR7yIyboYuwI8Yuo8hLHemjy9BGA/gG00fel6J51NH8zsRcOq3JSD5/B8kvVI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768289841; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=etaXAoNJdeB5FbTo207BjSP7E7AQ0R9OHOeVyQ3S7Jg=; b=fCT5gHm9okS287wTzYhLYmE0gkB0SiyJZZK6qsfFTuUt1xjMDYWkC2qZ8Erb0fTot0hzyOzwICvRsC5CBg5ouYkK+w3opU7DZ5EC7VaC0Au3De7NNxH7fBqKrnmpNCDe5b2brDFG+tKpp4sJSHov27/bJWUxRTxHE45DDEVnuBI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1768289841395215.91220310455287; Mon, 12 Jan 2026 23:37:21 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 83A4241896; Tue, 13 Jan 2026 02:37:20 -0500 (EST) Received: from [172.19.199.83] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id EC89841A4A; Tue, 13 Jan 2026 02:35:32 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id D1D2E41894; Tue, 13 Jan 2026 02:35:18 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id B1AC5417CE for ; Tue, 13 Jan 2026 02:35:17 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-177-DIL5zZBfNWSmjvtr9re2Fg-1; Tue, 13 Jan 2026 02:35:16 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2C5CF18005B2 for ; Tue, 13 Jan 2026 07:35:15 +0000 (UTC) Received: from vhost3.router.laine.org (unknown [10.22.80.83]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BF5661800998 for ; Tue, 13 Jan 2026 07:35:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768289717; h=from:from: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; bh=etaXAoNJdeB5FbTo207BjSP7E7AQ0R9OHOeVyQ3S7Jg=; b=dEvMSEVxHYWS2DcWWmOLA5mkyliu4Vz0SBU+PqauRTL6wseCaHvCuJgL7zB3Ni7lxTeHV6 tvF7a4+w+xjaa+Gz6aeXhKjnXsckknl9tuqq0oUY4dj3w1v5c/e+i9T8vQM7zfapmN18KT dYF+J2f0bVJZhEH69K2YjDnYoPdQiIk= X-MC-Unique: DIL5zZBfNWSmjvtr9re2Fg-1 X-Mimecast-MFC-AGG-ID: DIL5zZBfNWSmjvtr9re2Fg_1768289715 To: devel@lists.libvirt.org Subject: [PATCH 1/3] util: fix equivalence of AF_UNSPEC virSocketAddrs Date: Tue, 13 Jan 2026 02:35:11 -0500 Message-ID: <20260113073513.189733-2-laine@redhat.com> In-Reply-To: <20260113073513.189733-1-laine@redhat.com> References: <20260113073513.189733-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: hKhA89LT82rKyheMUtYwNtExbwG7ONRqHQGpWf5efAs_1768289715 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: BQ5RHD4VVYVFVVO4QWOVYD4J6HENYPUI X-Message-ID-Hash: BQ5RHD4VVYVFVVO4QWOVYD4J6HENYPUI X-MailFrom: laine@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Laine Stump via Devel Reply-To: Laine Stump X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1768289844341158500 Content-Type: text/plain; charset="utf-8"; x-default="true" If a virSocketAddr has family AF_UNSPEC that means it is unspecified/empty. If two virSocketAddrs are AF_UNSPEC then they are equal, but virSocketAddrEqual() was countint that as *not* equal. This doesn't make a difference for current uses of the function since they all check that at least one of the virSocketAddrs is *not* AF_UNSPEC before calling virSocketAddrEqual(), but an upcoming patch using virSocketAddrEqual() will not be making that check, so let's fix the utility function. Signed-off-by: Laine Stump --- src/util/virsocketaddr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c index f53768878e..4d4a6b2a0f 100644 --- a/src/util/virsocketaddr.c +++ b/src/util/virsocketaddr.c @@ -369,6 +369,8 @@ virSocketAddrEqual(const virSocketAddr *s1, const virSo= cketAddr *s2) return false; =20 switch (s1->data.stor.ss_family) { + case AF_UNSPEC: + return true; case AF_INET: return (memcmp(&s1->data.inet4.sin_addr.s_addr, &s2->data.inet4.sin_addr.s_addr, --=20 2.52.0