]> git.ipfire.org Git - thirdparty/openvpn.git/commit
dco.c: check certain options only on startup
authorLev Stipakov <lev@openvpn.net>
Fri, 9 Sep 2022 12:18:41 +0000 (15:18 +0300)
committerGert Doering <gert@greenie.muc.de>
Sun, 11 Sep 2022 17:02:01 +0000 (19:02 +0200)
commitf7b2817b8999d3ee846bfbafe11e05eda6501e96
treeac0cc8db20870266aef8dab2b5813789c137838c
parenta179d788c77d537b3a302320ebc476ca412c4e44
dco.c: check certain options only on startup

Following options are set on startup and cannot be changed later:

 - dev
 - dev-type
 - connections list
 - mode
 - topology

Same for system-wide availability of dco.

dco_check_option_conflict(), where those options
were checked, is also called in server mode when
client is connected. Move those checks to
dco_check_startup_option_conflict() which is only
called at startup.

Since we moved dco_enabled() check to startup,
dco_check_option_conflict() might now trigger exit
on Windows if system lacks chachapoly support.
Since dco checks only need to be performed for
dco, wrap those into "if (dco_enabled) {}".

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Antonio Quartulli <a@unstable.cc>
Message-Id: <20220909121841.646-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25158.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/dco.c
src/openvpn/dco.h
src/openvpn/multi.c
src/openvpn/options.c