summaryrefslogtreecommitdiffstats
path: root/src/openvpn/options.c
diff options
context:
space:
mode:
authorJens Wagner <jwagner@hexonet.net>2014-01-07 22:07:54 +0100
committerGert Doering <gert@greenie.muc.de>2014-01-07 22:16:50 +0100
commite93fb8ceebe9ca7748d8874893221a40330564e4 (patch)
tree93ad245f984f1e090d5ada2a9871855067a1cb3a /src/openvpn/options.c
parent5690c525e58769a72fb5dbe63b5f6af78dff92ad (diff)
downloadopenvpn-e93fb8ceebe9ca7748d8874893221a40330564e4.tar.gz
openvpn-e93fb8ceebe9ca7748d8874893221a40330564e4.tar.xz
openvpn-e93fb8ceebe9ca7748d8874893221a40330564e4.zip
Fix spurious ignoring of pushed config options (trac#349).
The function incoming_push_message(...) in push.c uses a local variable option_types_found, that gets passed to do_up(...). If the server push got split into several parts, only the last part (PUSH_MSG_REPLY) option_types_found is used for do_up (initilized as 0 locally), the previous ones (PUSH_MSG_CONTINUATION) are ignored. So e.g. a ping config, pushed by the server in the first push, followed by a lot of "push route" configs, causing a second push message, will have the do_up() called, but without e.g. the OPT_P_TIMER flag, so those options will be silently ignored. The patch resolves that, by introducing "push_option_types_found" in "c->options" and using that as storage. Fix trac bug #349. Acked-by: Gert Doering <gert@greenie.muc.de> URL: https://community.openvpn.net/openvpn/ticket/349 Signed-off-by: Gert Doering <gert@greenie.muc.de> (cherry picked from commit 1aac9a0b7a4046822a0134cd8693a828f2e16576)
Diffstat (limited to 'src/openvpn/options.c')
-rw-r--r--src/openvpn/options.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 2879654..34e44ec 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -2867,6 +2867,7 @@ pre_pull_restore (struct options *o)
}
o->push_continuation = 0;
+ o->push_option_types_found = 0;
}
#endif