]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Preserve ifconfig(_ipv6)_local across reconnect
authorLev Stipakov <lev@openvpn.net>
Thu, 9 Oct 2025 17:19:11 +0000 (19:19 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 9 Oct 2025 17:31:58 +0000 (19:31 +0200)
commit8a8360fc176b3996bfefee0ea894dc5c8a9ead1a
treea87af76837564c295944688f7d70fc6bd4061982
parent8fd8c4fa5d6c113925ebf42d47d9e8d3f292309f
Preserve ifconfig(_ipv6)_local across reconnect

Turns out that ifconfig_(ipv6)_local options are set once
and are not reset on a reconnect.

Consider following scenario:

 - connect first time, server pushes ifconfig-ipv6
 - add a ipv6 network route because ifconfig_ipv6_local is set
 - reconnect, server doesn't push ifconfig-ipv6

Because of ifconfig_ipv6_local is not reset and holds the value
set by the first connect, client adds a ipv6 network route -
but this is wrong, since ipv6 wasn't pushed this time by the server.

Fix by saving/restoring ifconfig(_ipv6)_local in a
struct options_pre_connect along with other options which
preserves the initial values until --pull modifications
are applied.

Github: OpenVPN/openvpn#850
Change-Id: I9b099924286f9bccb6833e1e40606abe72714bbb
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1248
Message-Id: <20251009171916.12811-1-gert@greenie.muc.de>
URL: https://sourceforge.net/p/openvpn/mailman/message/59244523/
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c
src/openvpn/options.h