]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix spurious ignoring of pushed config options (trac#349).
authorJens Wagner <jwagner@hexonet.net>
Tue, 7 Jan 2014 21:07:54 +0000 (22:07 +0100)
committerGert Doering <gert@greenie.muc.de>
Sun, 30 Nov 2014 17:52:41 +0000 (18:52 +0100)
commitfc3e1657f1b86f7c53bad989aa9c6f677ff17a9c
tree8dfbb645ad3f07d0bb61f4989900ac6521d7622b
parente5e01614c479e714aa3754050725692ec0b5c6f0
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)
options.c
options.h
push.c