From nobody Sun Feb 8 21:28:52 2026 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=1672675188; cv=none; d=zohomail.com; s=zohoarc; b=VlsshPWf6XLVJtxlx6Ns8Zs0ztu0SsIXFjMjJyUUFC5rJLbj7iI/ZPJ867uJklDVYJip5yYJ4jJzht9hZuUbs7yDndpoAEiw6YyoqmUAAnfZl05/+NoOg5ZUX/gb8062CXJZoS8bGODnyX57G2ZZPcMQnf4jtTXc796oAV2+P4A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672675188; 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=53p8OeZFy8p7iODRaQh0g+bI62PdW5rxmIpDp/Z77KM=; b=aBWvI0zmE2WOeLw64/jVDvoGYTodpcjqc1XZyuX0i6HwXf/a9YP43AwDP0a8QEXEbF0RQyf1+dM21dsuiDw0VOcnheIamVvfiFjgcdlxdwvDfPF46TvF+zkYV6bQCb7NJQnwcL/Qzm4ctDk4CctRlQuwuFRKL910oc+FjdI9nUg= 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 1672675188043567.120393197015; Mon, 2 Jan 2023 07:59:48 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-173-ZqS6ioRgNMq335UoxpjeOA-1; Mon, 02 Jan 2023 10:59:39 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9B4723811F21; Mon, 2 Jan 2023 15:59:36 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 84C4F1121314; Mon, 2 Jan 2023 15:59:36 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 69D1F1946588; Mon, 2 Jan 2023 15:59:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DB72A1946589 for ; Mon, 2 Jan 2023 15:59:34 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CB28B2166B2A; Mon, 2 Jan 2023 15:59:34 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast10.extmail.prod.ext.rdu2.redhat.com [10.11.55.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C431D2166B29 for ; Mon, 2 Jan 2023 15:59:34 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A04F31C05ACE for ; Mon, 2 Jan 2023 15:59:34 +0000 (UTC) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-665-KLn-VBFtMVKx1riHM06wvg-1; Mon, 02 Jan 2023 10:59:33 -0500 Received: by mail-ed1-f70.google.com with SMTP id v8-20020a056402348800b0048db0688c80so1925778edc.15 for ; Mon, 02 Jan 2023 07:59:33 -0800 (PST) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id b23-20020a17090630d700b008490dcae01asm12617090ejb.214.2023.01.02.07.59.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Jan 2023 07:59:31 -0800 (PST) Received: from wheatley.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 1A9F8C5DF282 for ; Mon, 2 Jan 2023 16:59:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672675187; 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=53p8OeZFy8p7iODRaQh0g+bI62PdW5rxmIpDp/Z77KM=; b=V5rrbx8SbqLxOG8mKEmwURznCbWrzwev3FD+aH1jK0tvwZvKN2YTeO4SUb0FaLCcJQfQE2 1PMxalrmlagfC2njcwWabH4oJ0eBcs/gFioKoBPgYETqlPF/pRQzRrTaxyh4bU15H7ni2l dKSf5A2OpScmHyJTpnqiNZeMwI6V5iw= X-MC-Unique: ZqS6ioRgNMq335UoxpjeOA-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: KLn-VBFtMVKx1riHM06wvg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=53p8OeZFy8p7iODRaQh0g+bI62PdW5rxmIpDp/Z77KM=; b=2hot/aXoOglvlnzBX/WfZtQQANRwLmSUn2H2uhFe+aH79x1zNAeIE9xfHCfC51lz1z UUHjZ+4BlnKvjjjf3dlPA+de7no+8sBToVG2ywO5+wHWFnyQyHEJta87nq7vxWfIhjqN kAT5gfXaWIP/3K9pCwHQ+fJicHToI79zw+bLyaCokrBpilV/Y72uMJ5xuZpyvPNEqotT 7R20fTmOVqDxXxiD/a4F2nknUKeNfEpyVgznv5hDw5Z/8d35FY/if9qafz6LGVFghkCm oPMHe5Y9ly+yOAzSPbtLMMd1t2lyhPYr+1B0d1LnbdHDXbxjgc/yzzu4szlAZh7a48kK Eg3g== X-Gm-Message-State: AFqh2krlAiPYzU67Txb8AL6YOYeuLyxrw8jwNEhGipCb39Vb0mJOzyO1 iS1r/fFw14nc5zwu1rjUc2KhycvIwqLcObe5wWcfirdGixJlwIapORfayqiwnN1vKmvnslBO2re MrD3rThwgYFf0UWPCToLdl/QFYa0RAZuLTJUm+8VbIt0ohGIGSvN1sExz2xtz7ol0CvQbryU= X-Received: by 2002:a17:906:158c:b0:7c4:f752:e959 with SMTP id k12-20020a170906158c00b007c4f752e959mr33500442ejd.33.1672675172238; Mon, 02 Jan 2023 07:59:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXtdaz4Wz2wuLl4pvMm7NmQg5R6obGoArFNpCwl2PVp6hXnZXc9DDExNWUPw8w/bb8uexuc/9Q== X-Received: by 2002:a17:906:158c:b0:7c4:f752:e959 with SMTP id k12-20020a170906158c00b007c4f752e959mr33500437ejd.33.1672675172029; Mon, 02 Jan 2023 07:59:32 -0800 (PST) From: Martin Kletzander To: libvir-list@redhat.com Subject: [PATCH 3/4] rpc: Fix error message in virNetServerSetClientLimits Date: Mon, 2 Jan 2023 16:59:23 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1672675189430100001 Content-Type: text/plain; charset="utf-8"; x-default="true" That way it actually fits with what the condition checks for. Signed-off-by: Martin Kletzander --- src/rpc/virnetserver.c | 6 ++-- ...nput-data-invalid-max-clients-failure.json | 31 +++++++++++++++++++ ...utput-data-invalid-max-clients-failure.err | 1 + tests/virnetdaemontest.c | 1 + 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 tests/virnetdaemondata/input-data-invalid-max-clients-f= ailure.json create mode 100644 tests/virnetdaemondata/output-data-invalid-max-clients-= failure.err diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c index 17ab61b88245..2ec4b9a6c947 100644 --- a/src/rpc/virnetserver.c +++ b/src/rpc/virnetserver.c @@ -1114,9 +1114,9 @@ virNetServerSetClientLimits(virNetServer *srv, =20 if (max < max_unauth) { virReportError(VIR_ERR_INVALID_ARG, "%s", - _("The overall maximum number of clients must be " - "greater than the maximum number of clients waiti= ng " - "for authentication")); + _("The overall maximum number of clients waiting " + "for authentication must not be less than the ove= rall " + "maximum number of clients")); return -1; } =20 diff --git a/tests/virnetdaemondata/input-data-invalid-max-clients-failure.= json b/tests/virnetdaemondata/input-data-invalid-max-clients-failure.json new file mode 100644 index 000000000000..9bd55929943b --- /dev/null +++ b/tests/virnetdaemondata/input-data-invalid-max-clients-failure.json @@ -0,0 +1,31 @@ +{ + "servers": { + "testServer0": { + "min_workers": 10, + "max_workers": 50, + "priority_workers": 5, + "max_clients": 5, + "max_anonymous_clients": 10, + "keepaliveInterval": 120, + "keepaliveCount": 5, + "next_client_id": 5, + "services": [ + { + "auth": 0, + "readonly": true, + "nrequests_client_max": 2, + "socks": [ + { + "fd": 100, + "errfd": -1, + "pid": 0, + "isClient": false + } + ] + } + ], + "clients": [ + ] + } + } +} diff --git a/tests/virnetdaemondata/output-data-invalid-max-clients-failure= .err b/tests/virnetdaemondata/output-data-invalid-max-clients-failure.err new file mode 100644 index 000000000000..00c2cee42c8c --- /dev/null +++ b/tests/virnetdaemondata/output-data-invalid-max-clients-failure.err @@ -0,0 +1 @@ +internal error: The overall maximum number of clients must not be less tha= n the number of clients waiting for authentication diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index 47d0923bdd93..110ec748f8b6 100644 --- a/tests/virnetdaemontest.c +++ b/tests/virnetdaemontest.c @@ -413,6 +413,7 @@ mymain(void) EXEC_RESTART_TEST_FAIL("anon-clients", 2); EXEC_RESTART_TEST("client-auth-pending", 1); EXEC_RESTART_TEST_FAIL("client-auth-pending-failure", 1); + EXEC_RESTART_TEST_FAIL("invalid-max-clients-failure", 1); =20 return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } --=20 2.39.0