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 From patchwork Wed Jul 27 17:45:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selva Nair X-Patchwork-Id: 2609 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director8.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id oEmQF5kG4mJ/BAAAIUCqbw (envelope-from ) for ; Wed, 27 Jul 2022 23:46:33 -0400 Received: from proxy3.mail.ord1d.rsapps.net ([172.30.191.6]) by director8.mail.ord1d.rsapps.net with LMTP id YE91F5kG4mJaXgAAfY0hYg (envelope-from ) for ; Wed, 27 Jul 2022 23:46:33 -0400 Received: from smtp7.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy3.mail.ord1d.rsapps.net with LMTPS id kLcPF5kG4mKUfwAA7WKfLA (envelope-from ) for ; Wed, 27 Jul 2022 23:46:33 -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: smtp7.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: defa4c06-0e27-11ed-8707-525400d0c497-1-1 Received: from [216.105.38.7] ([216.105.38.7:46232] helo=lists.sourceforge.net) by smtp7.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id B5/B9-02674-99602E26; Wed, 27 Jul 2022 23:46:33 -0400 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1oGuSu-0005YA-OP; Thu, 28 Jul 2022 03:45:35 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oGuSm-0005Xz-B8 for openvpn-devel@lists.sourceforge.net; Thu, 28 Jul 2022 03:45:27 +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:References: In-Reply-To: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qjQLUj0gaumj+nJwIq0zuKaezaJ9Inyf2QiOzoJ5G+M=; b=dc7sV9CIF3BU4vdWIndfWALKD0 bpMO6oEibmlRSciSfYqYFXttFMRCcm3p0IoAkP7Y4UTKdeR9CbKkc4AyXsywIkxcLFArkE8KCerCk WnuPKIZhkH52n65516lq/ZkzVtzF23yoZ79ydRs6dxlV07MBKlZN/1W0yDLjqT9yv/4E=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=qjQLUj0gaumj+nJwIq0zuKaezaJ9Inyf2QiOzoJ5G+M=; b=nC92c8amKMatRZF32ll0WZrO+0 5XG2Z7771EP8VT5PDFzo1wM8A4HePpDTO69XGdOPF6RidQONdpkfQGyHnEACN0hPfMsXOWm8E/0Ki gLBrB9olX0Rm9N0siayLx+cG9fVv5DkUu2wlW2yCY3APDGj0IwYchnLWiougMnOYWzPo=; Received: from mail-il1-f171.google.com ([209.85.166.171]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.94.2) id 1oGuSk-00CaZ4-B9 for openvpn-devel@lists.sourceforge.net; Thu, 28 Jul 2022 03:45:26 +0000 Received: by mail-il1-f171.google.com with SMTP id d4so409666ilc.8 for ; Wed, 27 Jul 2022 20:45:26 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=qjQLUj0gaumj+nJwIq0zuKaezaJ9Inyf2QiOzoJ5G+M=; b=l8W6FIg2YV9H1eJSw0AGKC8Xez+5waunUX3orNIi+wGscw6n3NaoOnoKvTywpWO4kf Fw8q1+DhGZSFtV5nlICNUQ6OFh4FTr4nmBKwYg4RwKHdd1p7b05TQOjUb/2Q9DFTg0OS 8Zz/4pwz0OpxjRFf6tS3GxjQU8aCoDRa9wm6oILXZF6lNWs7d1jP98HfkdvQtyHpFAsc xU+pce6rckRZve1BwjTaZdDg+xjy/VWfc/4FxfEt6yfvhMZOKESTXMN4JtcRmcqsk0ww XvBgvg9fV0R0ZbwzoVjYh6JJjXppaphKMn3+WTOJajIzRadMPE1fovoWJmoR+FOIRIIt XrQg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=qjQLUj0gaumj+nJwIq0zuKaezaJ9Inyf2QiOzoJ5G+M=; b=kwKVNi0zOXtxaBJacIuhrK9f3T7BVF/22Ck6ko58Wi/x5bLYxsViqO81vd0gfo1REy uC1Cc8YKWlSpqZYX4nb/lVF0G/BK3/AqcEgNFc8q8Yt9/qkhYrhyUgisV+XfdgckMqqi UlSg6hMYSks8186WWk7JJbI5iJr+ht+k0OzMv1OsWKMttqSzTL40uohubtUT3/T1JDg4 GlbbShb7XKpOe28PaNM3kVcjE/EPB4/LWwMLCKOvou1VxFxp/1zg4P+v0hcv4wOselj+ 1XG/Kw/g8Nebue6l72mVAihHjPwl3YgTapzkPwXjTTFeQiP+UZ9UOrBxNIizWlAFBlSb 03sg== X-Gm-Message-State: AJIora+W71ImpNPDRIXzwv0y7QQ34Vd6APcPehnUMBCvSty9qocTpd3G GzuCIgTm6Y7PlFchSsKGSZewsThzXldWVw== X-Google-Smtp-Source: AGRyM1vl4GzYK37y+YJ0G1+ruoA5+E1bqjX3HLG2ljG5gk4nJ7KMiI36t6IagJDkHCC7RtTTr8x7tQ== X-Received: by 2002:a92:c566:0:b0:2dc:7f17:820b with SMTP id b6-20020a92c566000000b002dc7f17820bmr10209058ilj.23.1658979920665; Wed, 27 Jul 2022 20:45:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Jul 2022 20:45:20 -0700 (PDT) From: selva.nair@gmail.com To: openvpn-devel@lists.sourceforge.net Date: Wed, 27 Jul 2022 23:45:08 -0400 Message-Id: <20220728034508.15180-2-selva.nair@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220728034508.15180-1-selva.nair@gmail.com> References: <20220728034508.15180-1-selva.nair@gmail.com> 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 Without this, replies to commands from the management client are sometimes lost if the server is writing when a command comes in and leads to a recursive call to this function. For some reason I've not been able to trigger this on Linux, but it does sometimes happen on Windows during intense write activity by openvpn.exe sending log lines to the management client. Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -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.171 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.171 listed in list.dnswl.org] X-Headers-End: 1oGuSk-00CaZ4-B9 Subject: [Openvpn-devel] [PATCH 2/2] Allow a few levels of recursion in virtual_output_callback() 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 Without this, replies to commands from the management client are sometimes lost if the server is writing when a command comes in and leads to a recursive call to this function. For some reason I've not been able to trigger this on Linux, but it does sometimes happen on Windows during intense write activity by openvpn.exe sending log lines to the management client. Signed-off-by: Selva Nair Acked-by: Gert Doering --- src/openvpn/manage.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/openvpn/manage.c b/src/openvpn/manage.c index 27aa49a8..5670e594 100644 --- a/src/openvpn/manage.c +++ b/src/openvpn/manage.c @@ -312,8 +312,7 @@ virtual_output_callback_func(void *arg, const unsigned int flags, const char *st #define AF_DID_PUSH (1<<0) #define AF_DID_RESET (1<<1) - - if (!recursive_level) /* don't allow recursion */ + if (recursive_level < 5) /* limit recursion */ { struct gc_arena gc = gc_new(); struct log_entry e; @@ -380,6 +379,12 @@ virtual_output_callback_func(void *arg, const unsigned int flags, const char *st --recursive_level; } + else + { + /* cannot use msg here */ + printf("virtual_output: message to management interface " + "dropped due to recursion: <%s>\n", str); + } } /*