From patchwork Wed Jul 27 17:45:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selva Nair X-Patchwork-Id: 2608 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director10.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id iF0nL5YG4mJbBAAAIUCqbw (envelope-from ) for ; Wed, 27 Jul 2022 23:46:30 -0400 Received: from proxy18.mail.ord1d.rsapps.net ([172.30.191.6]) by director10.mail.ord1d.rsapps.net with LMTP id yPX+LpYG4mKrcwAApN4f7A (envelope-from ) for ; Wed, 27 Jul 2022 23:46:30 -0400 Received: from smtp39.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy18.mail.ord1d.rsapps.net with LMTPS id eD2ULpYG4mJFKAAATCaURg (envelope-from ) for ; Wed, 27 Jul 2022 23:46:30 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp39.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=gmail.com; dmarc=fail (p=none; dis=none) header.from=gmail.com X-Suspicious-Flag: YES X-Classification-ID: dc8ae23c-0e27-11ed-b6a6-525400a97bbc-1-1 Received: from [216.105.38.7] ([216.105.38.7:32832] helo=lists.sourceforge.net) by smtp39.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 27/D5-06064-49602E26; Wed, 27 Jul 2022 23:46:29 -0400 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1oGuSj-0000UB-Ec; Thu, 28 Jul 2022 03:45:26 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oGuSi-0000U4-0M for openvpn-devel@lists.sourceforge.net; Thu, 28 Jul 2022 03:45:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=V77l+x9K03q9BFurCzMqQxKLSVFODVTsAfZ94QNNtqE=; b=ctZJxE/pFnL6PGBEMEkCysox1E W6kQFpr1Gu7+6fX4zg662X/CaQ4ivgK6pcwyWWr/F+/0ykJeigLWtYLyQdmcSD17MA1lvQR4IOyPK v+CnTECDDeVu8TkjZfQLyJ+FlG5oU9SJ9fLfCEOirxH5TDUvZL4XDnwSuon6vlTJwlw8=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=V77l+x9K03q9BFurCzMqQxKLSVFODVTsAfZ94QNNtqE=; b=c bIpCZilqNfqcD0leDBpGzgtXHURJ9nLH3VcJsUUEpeUyphgzDno7+W1E23VS9aBdDp7KryrVdVnNu 2LzSOiyu4zcZT/4yILc3aWGyUlaf2fbUF7jy2pZ5BUrkKNPDYEzWxtLfUPBpJE+2TI0zke2Dh6sVJ fvA29Joa4DMPgrqA=; Received: from mail-io1-f42.google.com ([209.85.166.42]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.94.2) id 1oGuSh-00069i-RP for openvpn-devel@lists.sourceforge.net; Thu, 28 Jul 2022 03:45:24 +0000 Received: by mail-io1-f42.google.com with SMTP id q14so585953iod.3 for ; Wed, 27 Jul 2022 20:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=V77l+x9K03q9BFurCzMqQxKLSVFODVTsAfZ94QNNtqE=; b=LybkiplIKmJroRch7lmKKGrLydPXgUG3Xq2ezaiBIWJkLk4w/OEi6GPC7RD0zUAhcg MWnWBxszz2c9TeZxvkX0aTiM503owv+IfAGlau/OSSZLBFXtfP8gtDmp0/S7vuJo247y A1hprfWogt1ZUtAmTHfIPU0eMGAmhSZWGuiQxSso/7FHwsidSk8ePzXvmSa+nQj8U0Mb uKq8mDUAThXQSKspuR4nUbEc0+ZjEUtlCKh4BKLW+0+/OsnSQDAuQxWK+7EdNKY5M/pr YG4NeLemhCy/+/uS5X93U22djepCnWZypVxvuFguFzeFNZ5z1lsu3POH4NbeilYQ5LjI ZuHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=V77l+x9K03q9BFurCzMqQxKLSVFODVTsAfZ94QNNtqE=; b=roMwcNZO21JgOJ6HrUnNzeDC0vTbjcaWIVZTUvhQYnG/BsrMuzowZV4Ubue3QsuJG4 oO0oAenqPkz21m0Zl2KE8UmWAIx/UxF93KPug6hbGjLScGbCahDgCahTDV60664tbn0F e0xg7i2Fh4Vk9v4EPeevSM8b6EU8HELRCOTZ2LGpbPF7JCrGEdvGJOGGHzvcgA9bgn/H nfyAnfPflqL77DM6XwfCFHyVOWWZo5T58Nq/MYsNvBXXnTG7zAmxtSNXyHr8MJvTz6NA Hqys3nNyMv15rxqgxFxU8MSIYpLHK92JQ4LwvKUrZ5j9PwYezIEfa1F9lfpPMLvXWiqg HMGQ== X-Gm-Message-State: AJIora+G0G0m/2Y7g1MjAuvFgHcHeQFrTnBSUAmtcAp+MY/iTvSBCoTi k3h7IoT0Nx5IOPc/v4ZIIr+whW1aEjlFbg== X-Google-Smtp-Source: AGRyM1v8Pl2RRggoxOicCmXJYuuBOnuoALFwNU7BGP+AjIdRhImnyUs1+cXJZVkRQ0qnRAsXaCzNhQ== X-Received: by 2002:a05:6638:300b:b0:341:d28e:871 with SMTP id r11-20020a056638300b00b00341d28e0871mr6520234jak.140.1658979918035; Wed, 27 Jul 2022 20:45:18 -0700 (PDT) Received: from uranus.home.sansel.ca ([2600:3c03:e001:3b08::1004]) by smtp.gmail.com with ESMTPSA id d184-20020a0262c1000000b0033f0c9f4fbesm8758203jac.135.2022.07.27.20.45.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 20:45:17 -0700 (PDT) From: selva.nair@gmail.com To: openvpn-devel@lists.sourceforge.net Date: Wed, 27 Jul 2022 23:45:07 -0400 Message-Id: <20220728034508.15180-1-selva.nair@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Selva Nair Generally we expect a response of SUCCESS: or ERROR: to every command sent to the management interface. But, while in the management-hold state, sending "signal foo" returns only the following reply ( [...] Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.42 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [selva.nair[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.42 listed in wl.mailspike.net] X-Headers-End: 1oGuSh-00069i-RP Subject: [Openvpn-devel] [PATCH 1/2] Do not skip ERROR:/SUCCESS: response from management interface X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Selva Nair Generally we expect a response of SUCCESS: or ERROR: to every command sent to the management interface. But, while in the management-hold state, sending "signal foo" returns only the following reply (with foo = SIGHUP, SIGUSR1 etc.): >HOLD:Waiting for hold release:0 Fix by always responding ERROR: signal 'foo' is currently ignored" followed by the above line. Though this is seldom seen in practice[*], such violation of the protocol could stall clients like the GUI. So fix it. [*] One way this happens is with SIGHUP sent before the daemon is on hold state which it enters before the SIGHUP is received. Signed-off-by: Selva Nair Acked-By: Arne Schwabe --- src/openvpn/manage.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index 5d58c662..27aa49a8 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -426,14 +426,11 @@ man_signal(struct management *man, const char *name) } else { + msg(M_CLIENT, "ERROR: signal '%s' is currently ignored", name); if (man->persist.special_state_msg) { msg(M_CLIENT, "%s", man->persist.special_state_msg); } - else - { - msg(M_CLIENT, "ERROR: signal '%s' is currently ignored", name); - } } } else