From: Arne Schwabe Date: Thu, 8 Apr 2021 12:00:28 +0000 (+0200) Subject: Also restore/save compress related options in reconnects X-Git-Tag: v2.6_beta1~543 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a414c3c79bba089183a517a2d355b5aaae0b4a4;p=thirdparty%2Fopenvpn.git Also restore/save compress related options in reconnects Trac: #1396, #128 Signed-off-by: Arne Schwabe Acked-by: Gert Doering Message-Id: <20210408120029.19438-2-arne@rfc2549.org> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22078.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 614f9a74e..7457d0c5b 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -3593,6 +3593,11 @@ pre_connect_save(struct options *o) o->pre_connect->ping_rec_timeout = o->ping_rec_timeout; o->pre_connect->ping_rec_timeout_action = o->ping_rec_timeout_action; o->pre_connect->ping_send_timeout = o->ping_send_timeout; + + /* Miscellaneous Options */ +#ifdef USE_COMP + o->pre_connect->comp = o->comp; +#endif } void @@ -3645,6 +3650,11 @@ pre_connect_restore(struct options *o, struct gc_arena *gc) o->ping_rec_timeout = pp->ping_rec_timeout; o->ping_rec_timeout_action = pp->ping_rec_timeout_action; o->ping_send_timeout = pp->ping_send_timeout; + + /* Miscellaneous Options */ +#ifdef USE_COMP + o->comp = pp->comp; +#endif } o->push_continuation = 0; diff --git a/src/openvpn/options.h b/src/openvpn/options.h index 27ac74f1f..96dfe0780 100644 --- a/src/openvpn/options.h +++ b/src/openvpn/options.h @@ -81,6 +81,9 @@ struct options_pre_connect int ping_rec_timeout_action; int foreign_option_index; +#ifdef USE_COMP + struct compress_options comp; +#endif }; #if !defined(ENABLE_CRYPTO_OPENSSL) && !defined(ENABLE_CRYPTO_MBEDTLS)