]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Also restore/save compress related options in reconnects
authorArne Schwabe <arne@rfc2549.org>
Thu, 8 Apr 2021 12:00:28 +0000 (14:00 +0200)
committerGert Doering <gert@greenie.muc.de>
Sat, 17 Apr 2021 08:42:10 +0000 (10:42 +0200)
Trac: #1396, #128

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
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 <gert@greenie.muc.de>
src/openvpn/options.c
src/openvpn/options.h

index 614f9a74e2cedd95570fc751871dd216a73e3030..7457d0c5bf30e5d430df676d5f551c5e2aefd19f 100644 (file)
@@ -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;
index 27ac74f1fd793ef746bb43dfcf6aca87fb2aea54..96dfe0780b0e1da704cee9450cbc26b3876b7c35 100644 (file)
@@ -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)