]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Introduce env variables to communicate desired gateway redirection to NM.
authorGert Doering <gert@greenie.muc.de>
Tue, 26 Aug 2025 18:40:38 +0000 (20:40 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 27 Aug 2025 19:02:18 +0000 (21:02 +0200)
commit1cc3525b46a3ef8b064e44b0ea33d84a39a479e9
treefc3b0c60b8201e577717356ac8a9d71ce66e851d
parent3671c420f60004d694ce4970cf333db79a4aed29
Introduce env variables to communicate desired gateway redirection to NM.

When run under Network Manager control, OpenVPN is not allowed to
control routing.  Instead, NM uses the OpenVPN-set environment variables
("route_network_1" etc) to set up routes as requested.  This method never
worked properly for "redirect-gateway", as the information was not made
available in environment variables.

Introduce new env vars:

 route_redirect_gateway_ipv4
 route_redirect_gateway_ipv6

to communicate desired state:

 <not set> = no gateway redirection desired
 1 = "redirect-gateway for that protocol in question"
 2 = "include block-local to redirect the local LAN as well"

We intentionally do not expose all the IPv4 flags ("local", "def1", ...)
as this is really internal OpenVPN historical cruft.

Change-Id: I1e623b4a836f7216750867243299c7e4d0bd32d0
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Message-Id: <20250826184046.21434-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32686.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
doc/man-sections/script-options.rst
src/openvpn/options.c