From patchwork Wed Nov 18 18:16:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5743 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:6022:b1c3:10b0:11b:d6c:f273 with SMTP id i3-n1csp533447laq; Wed, 18 Nov 2026 10:16:26 -0800 (PST) X-Forwarded-Encrypted: i=2; AL+hErGsreOCIqb7CAkIZXNESjpoA0AhCwKQAbcrI58AwXNfFp5Fm+RaF9QNPqc0VXjx0Lu6qlYvIBt97+k=@openvpn.net X-Received: by 2002:a05:6820:1c85:b0:71a:ecfc:4438 with SMTP id 006d021491bc7-71b1846cf4amr2139425eaf.24.1795025786090; Wed, 18 Nov 2026 10:16:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1795025786; cv=none; d=google.com; s=arc-20260327; b=CfJiSJqgmaLkrpXBJeVNZkAZBIOtHMTPOhpddf1XOoSLl5yXY1m1Mv9cLRo/de94iw TTbHGm2OfqUHQj79zpI+5RYqLAS+auTo7b4m19/HaX1oMysppj1UfC7oa2o0BBiboTxk IMPwy/VqJE3Sp51jIe+QHN/doA59SNtAEv/b5JnV5W8dqDfRlVwDsmYteuqrNuQ9Y37y HD6h35Uius2xwrDGmYDu7eYLZSVeekoZagnvYYEZM7oUfYo3LIk6OJfncUZpr/UTe8NL Z0m0Rqgm3QGGWRL6jiBIBiSyiE/dKwrtzxsFltrG/RZErdA/zItZCoiwLJYeHY34/Jh1 h/tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=VECvhFpLvPcDLPbhsbotivf6SAOGqOdEfwdD6FMAxho=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=WA1PrT8KHIIQJIxa03+cPyOueXrFVrwD3lmak8q/Ps5SPaJp62lafTRfEJmMUOPRGt e5ot9wuK3osr9zb18CUVZS/X2tcGtY35zfeVZECDwKVsb7i7nJqUB9OgUB1bgaM2I0cz m5I8p3wUega5xRLzcWUjKmgshcbOMFjLVrU920fLEd/q4/1Vz+az3WEtdQGXVFaBYraH fqXKVGhGmXt8TGNlVPJNnsWvbNho0u1PgZtoA4mhqlRZzgVgUN9a2zaNNplRd6HoFWZv 1nY8JDZTGVhKAgA9WgBCbw/CSAQkgPAeoWtvn1zDBc6vR1HLneM/oFbkn6dBQZyE57zW XqlA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=SrZ4BF8N; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="J/rwLpVW"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=PLRBSlkm; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 006d021491bc7-71b1979cedesi4263713eaf.85.2026.11.18.10.16.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Nov 2026 10:16:26 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=SrZ4BF8N; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="J/rwLpVW"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=PLRBSlkm; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=VECvhFpLvPcDLPbhsbotivf6SAOGqOdEfwdD6FMAxho=; b=SrZ4BF8NjEbhco 5+3YuuU8f60D/eYCDxMU//cABdgqhtF2qWIunwL0PG9ZhOFbkE+zoRhtfuWfW0RMfX95vJc1hrE1G pQ6OKM0UbxjTefX7RO9+gFhF61xiQISehcX92vzlSXawrF3DKaUoBo/HY/flhiVYgyhj4LVR2i7VT s/g=; 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.100.1) (envelope-from ) id 1xTkCm-000000000vo-3s96; Wed, 18 Nov 2026 18:16:24 +0000 Received: from [172.30.29.66] (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.100.1) (envelope-from ) id 1xTkCl-000000000vh-363y for openvpn-devel@lists.sourceforge.net; Wed, 18 Nov 2026 18:16:23 +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:To:From:Sender:Reply-To:Cc: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-Unsubscribe-Post:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QWhSx4buV43G3A2QFCELEWlqy3a5C2EY/zaItd5UiNE=; b=J/rwLpVWK0XDQXNyOvf7v8P0+5 Cv5onF0+a+rFXrbMPtLkcYHv/FCZgNMjzceYRedYx2VQNgmX0qpLkWAjgBLePHCHs31tgrx+UP12i dZVIvu8XdOwEzScK4rdxGwq5Ws5BTVQv2WXTbQFZRL6XJJk6QM82R9yB4EpEohQkan90=; 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:To:From:Sender:Reply-To:Cc: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-Unsubscribe-Post: List-Subscribe:List-Post:List-Owner:List-Archive; bh=QWhSx4buV43G3A2QFCELEWlqy3a5C2EY/zaItd5UiNE=; b=PLRBSlkmkSik3VIVW1rSIlLE0T 8RiAh9SMZJrbMzQB3o8FPC6MrnrvVgCNdyI3zynmx8ow2iyFMI/wAm6gVAN7iC7CJNeVJosthq9vZ mXpsOty5zlty58cI2YI/TbMTp0Megm/z6nFi23DL3oirmLRO6HA+ndXC3hMvoILrPM48=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.100.1) id 1xTkCi-000000006tD-3Qad for openvpn-devel@lists.sourceforge.net; Wed, 18 Nov 2026 18:16:23 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 6AIIGDMu002886 for ; Wed, 18 Nov 2026 19:16:13 +0100 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 6AIIGDas002885 for openvpn-devel@lists.sourceforge.net; Wed, 18 Nov 2026 19:16:13 +0100 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Wed, 18 Nov 2026 19:16:08 +0100 Message-ID: <20261118181613.2865-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.55.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", 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: Heiko Hund Since c139e82d the service puts --msg-channel in front of the user options, a --route-method from the config overrides the service route method implicitly set by --msg-channel, and adding routes in tu [...] Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1xTkCi-000000006tD-3Qad Subject: [Openvpn-devel] [PATCH v1] options: let the interactive service add routes again 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 X-GMAIL-THRID: 1882220958542572242 X-GMAIL-MSGID: 1882220958542572242 From: Heiko Hund Since c139e82d the service puts --msg-channel in front of the user options, a --route-method from the config overrides the service route method implicitly set by --msg-channel, and adding routes in turn fails without admin rights. Force the service route method in postprocessing when --msg-channel is used, independent of the option order. Github: OpenVPN/openvpn#1151 Change-Id: I4571033af79092d85657b176044497245faf5e39 Signed-off-by: Heiko Hund Acked-by: Razvan Cojocaru Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2219 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2219 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Razvan Cojocaru diff --git a/doc/man-sections/windows-options.rst b/doc/man-sections/windows-options.rst index 8d7dcbb..87c7008 100644 --- a/doc/man-sections/windows-options.rst +++ b/doc/man-sections/windows-options.rst @@ -179,6 +179,10 @@ :code:`exe` Call the route.exe shell command. + When OpenVPN is started by the interactive service, the service adds + the routes and a ``--route-method`` given in the configuration is + ignored. + --service args Should be used when OpenVPN is being automatically executed by another program in such a context that no interaction with the user via display diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 947439d..09a9d522 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -2494,6 +2494,14 @@ options->ifconfig_noexec = false; } + /* the service adds the routes, --route-method must not override it */ + if (options->msg_channel && options->route_method != ROUTE_METHOD_SERVICE) + { + msg(M_WARN, "WARNING: ignoring --route-method, routes are added by the interactive service"); + options->route_method = ROUTE_METHOD_SERVICE; + } + + /* this depends on options->route_method, which is set above */ remap_redirect_gateway_flags(options); /*