From: "mrbff (Code Review)" Date: Fri, 21 Mar 2025 04:57:34 +0000 In-Reply-To: References: Reply-To: marco@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., lstipakov@...277... Message-ID: <3ff57c6ff2133b1e596d84d267e6fa919e527df7-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="cuFnYZCgxVI="; charset=UTF-8 Subject: [Openvpn-devel] [L] Change in openvpn[master]: PUSH_UPDATE: Allow OpenVPN in client mode to receive and handle PUSH ... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld , stipa Cc: openvpn-devel --cuFnYZCgxVI= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, mrbff, stipa. Hello flichtenheld, plaisthos, stipa, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/808?usp=3Demail to look at the new patch set (#12). The following approvals got outdated and were removed: Code-Review+2 by stipa, Code-Review-1 by flichtenheld The change is no longer submittable: Code-Review and checks~ChecksSubmitRul= e are unsatisfied now. Change subject: PUSH_UPDATE: Allow OpenVPN in client mode to receive and ha= ndle PUSH UPDATE control messages to allow options updating at runtime. ...................................................................... PUSH_UPDATE: Allow OpenVPN in client mode to receive and handle PUSH UPDATE= control messages to allow options updating at runtime. * Added IV_PROTO_PUSH_UPDATE flag bit to support push-updates. * Added process_incoming_push_update(), in a separate file to create tests = more easily. * Modified incoming_push_message(), process_incoming_push_msg(), apply_push= _options(), apply_pull_filter() to process also push-update messages. * Added the check_push_update_option_flags() function used in apply_pull_fi= lter() to check options formatting inside push-update messages, if the options are = updatables and to check for '?' and '-' flags that may be present in front of the op= tions. The '-' flag is used to indicate that the option in question should be re= moved, while the '?' indicates that the option is optional and to do not generate errors if the client cannot update that option. For more info you can read the RFC at https://github.com/OpenVPN/openvpn-= rfc . * Created some unit tests for the push-update message handling in test_push= _update_msg.c. Change-Id: I6ecd4cb47571cc8c20e46de8595c742aeec6064a Signed-off-by: Marco Baffo --- M CMakeLists.txt M src/openvpn/Makefile.am M src/openvpn/forward.c M src/openvpn/init.c M src/openvpn/options.c M src/openvpn/options.h M src/openvpn/options_util.c M src/openvpn/options_util.h M src/openvpn/push.c M src/openvpn/push.h A src/openvpn/push_util.c M src/openvpn/ssl.c M src/openvpn/ssl.h M tests/unit_tests/openvpn/Makefile.am A tests/unit_tests/openvpn/test_push_update_msg.c 15 files changed, 643 insertions(+), 112 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/08/808/12 diff --git a/CMakeLists.txt b/CMakeLists.txt index b04adce..f597a89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -506,6 +506,7 @@ src/openvpn/ps.c src/openvpn/ps.h src/openvpn/push.c + src/openvpn/push_util.c src/openvpn/push.h src/openvpn/pushlist.h src/openvpn/reflect_filter.c @@ -622,6 +623,7 @@ "test_provider" "test_ssl" "test_user_pass" + "test_push_update_msg" ) if (WIN32) @@ -824,6 +826,14 @@ src/openvpn/run_command.c ) + target_sources(test_push_update_msg PRIVATE + tests/unit_tests/openvpn/mock_msg.c + tests/unit_tests/openvpn/mock_get_random.c + src/openvpn/push_util.c + src/openvpn/options_util.c + src/openvpn/otime.c + ) + if (TARGET test_argv) target_link_options(test_argv PRIVATE -Wl,--wrap=3Dparse_line) target_sources(test_argv PRIVATE diff --git a/src/openvpn/Makefile.am b/src/openvpn/Makefile.am index 37af683..e349282 100644 --- a/src/openvpn/Makefile.am +++ b/src/openvpn/Makefile.am @@ -116,7 +116,7 @@ proto.c proto.h \ proxy.c proxy.h \ ps.c ps.h \ - push.c push.h \ + push.c push_util.c push.h \ pushlist.h \ reflect_filter.c reflect_filter.h \ reliable.c reliable.h \ diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index af1d008..59df966 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -2038,7 +2038,7 @@ } /* check for incoming control messages on the control channel like - * push request/reply, or authentication failure and 2FA messages */ + * push request/reply/update, or authentication failure and 2FA messag= es */ if (tls_test_payload_len(c->c2.tls_multi) > 0) { check_incoming_control_channel(c); diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 1be205b..cd94e6e 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -2048,8 +2048,8 @@ /* possibly add routes */ if ((route_order(c->c1.tuntap) =3D=3D ROUTE_AFTER_TUN) && (!c->opt= ions.route_delay_defined)) { - int status =3D do_route(&c->options, c->c1.route_list, c->c1.r= oute_ipv6_list, - c->c1.tuntap, c->plugins, c->c2.es, &c->= net_ctx); + bool status =3D do_route(&c->options, c->c1.route_list, c->c1.= route_ipv6_list, + c->c1.tuntap, c->plugins, c->c2.es, &c-= >net_ctx); *error_flags |=3D (status ? 0 : ISC_ROUTE_ERRORS); } diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 67ef55b..bf29c56 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -65,6 +65,7 @@ #include #include "memdbg.h" +#include "options_util.h" const char title_string[] =3D PACKAGE_STRING @@ -941,24 +942,6 @@ } } -struct pull_filter -{ -#define PUF_TYPE_UNDEF 0 /**< undefined filter type */ -#define PUF_TYPE_ACCEPT 1 /**< filter type to accept a matching option = */ -#define PUF_TYPE_IGNORE 2 /**< filter type to ignore a matching option = */ -#define PUF_TYPE_REJECT 3 /**< filter type to reject and trigger SIGUSR= 1 */ - int type; - int size; - char *pattern; - struct pull_filter *next; -}; - -struct pull_filter_list -{ - struct pull_filter *head; - struct pull_filter *tail; -}; - #ifndef ENABLE_SMALL static const char * @@ -5433,84 +5416,6 @@ } } -/** - * Filter an option line by all pull filters. - * - * If a match is found, the line is modified depending on - * the filter type, and returns true. If the filter type is - * reject, SIGUSR1 is triggered and the return value is false. - * In that case the caller must end the push processing. - */ -static bool -apply_pull_filter(const struct options *o, char *line) -{ - struct pull_filter *f; - - if (!o->pull_filter_list) - { - return true; - } - - /* skip leading spaces matching the behaviour of parse_line */ - while (isspace(*line)) - { - line++; - } - - for (f =3D o->pull_filter_list->head; f; f =3D f->next) - { - if (f->type =3D=3D PUF_TYPE_ACCEPT && strncmp(line, f->pattern, f-= >size) =3D=3D 0) - { - msg(D_LOW, "Pushed option accepted by filter: '%s'", line); - return true; - } - else if (f->type =3D=3D PUF_TYPE_IGNORE && strncmp(line, f->patter= n, f->size) =3D=3D 0) - { - msg(D_PUSH, "Pushed option removed by filter: '%s'", line); - *line =3D '\0'; - return true; - } - else if (f->type =3D=3D PUF_TYPE_REJECT && strncmp(line, f->patter= n, f->size) =3D=3D 0) - { - msg(M_WARN, "Pushed option rejected by filter: '%s'. Restartin= g.", line); - *line =3D '\0'; - throw_signal_soft(SIGUSR1, "Offending option received from ser= ver"); - return false; - } - } - return true; -} - -bool -apply_push_options(struct options *options, - struct buffer *buf, - unsigned int permission_mask, - unsigned int *option_types_found, - struct env_set *es) -{ - char line[OPTION_PARM_SIZE]; - int line_num =3D 0; - const char *file =3D "[PUSH-OPTIONS]"; - const int msglevel =3D D_PUSH_ERRORS|M_OPTERR; - - while (buf_parse(buf, ',', line, sizeof(line))) - { - char *p[MAX_PARMS+1]; - CLEAR(p); - ++line_num; - if (!apply_pull_filter(options, line)) - { - return false; /* Cause push/pull error and stop push processin= g */ - } - if (parse_line(line, p, SIZE(p)-1, file, line_num, msglevel, &opti= ons->gc)) - { - add_option(options, p, false, file, line_num, 0, msglevel, - permission_mask, option_types_found, es); - } - } - return true; -} - void options_server_import(struct options *o, const char *filename, @@ -5644,6 +5549,44 @@ return options->forward_compatible ? M_WARN : msglevel; } +bool +apply_push_options(struct context *c, + struct options *options, + struct buffer *buf, + unsigned int permission_mask, + unsigned int *option_types_found, + struct env_set *es, + bool is_update) +{ + char line[OPTION_PARM_SIZE]; + int line_num =3D 0; + const char *file =3D "[PUSH-OPTIONS]"; + const int msglevel =3D D_PUSH_ERRORS|M_OPTERR; + + while (buf_parse(buf, ',', line, sizeof(line))) + { + char *p[MAX_PARMS+1]; + CLEAR(p); + ++line_num; + unsigned int push_update_option_flags =3D 0; + + if (!apply_pull_filter(options, line, is_update, &push_update_opti= on_flags)) + { + throw_signal_soft(SIGUSR1, "Offending option received from ser= ver"); + return false; /* Cause push/pull error and stop push processin= g */ + } + if (parse_line(line, p, SIZE(p)-1, file, line_num, msglevel, &opti= ons->gc)) + { + if (!is_update) + { + add_option(options, p, false, file, line_num, 0, msglevel, + permission_mask, option_types_found, es); + } + } + } + return true; +} + static void set_user_script(struct options *options, const char **script, diff --git a/src/openvpn/options.h b/src/openvpn/options.h index fa617c8..cb3a589 100644 --- a/src/openvpn/options.h +++ b/src/openvpn/options.h @@ -793,6 +793,33 @@ #define MAN_CLIENT_AUTH_ENABLED(opt) (false) #endif +/* + * some PUSH_UPDATE options + */ +#define OPT_P_U_ROUTE (1<<0) +#define OPT_P_U_ROUTE6 (1<<1) +#define OPT_P_U_DNS (1<<2) +#define OPT_P_U_DHCP (1<<3) +#define OPT_P_U_REDIR_GATEWAY (1<<4) + +struct pull_filter +{ +#define PUF_TYPE_UNDEF 0 /**< undefined filter type */ +#define PUF_TYPE_ACCEPT 1 /**< filter type to accept a matching option = */ +#define PUF_TYPE_IGNORE 2 /**< filter type to ignore a matching option = */ +#define PUF_TYPE_REJECT 3 /**< filter type to reject and trigger SIGUSR= 1 */ + int type; + int size; + char *pattern; + struct pull_filter *next; +}; + +struct pull_filter_list +{ + struct pull_filter *head; + struct pull_filter *tail; +}; + void parse_argv(struct options *options, const int argc, char *argv[], @@ -861,11 +888,13 @@ void pre_connect_restore(struct options *o, struct gc_arena *gc); -bool apply_push_options(struct options *options, +bool apply_push_options(struct context *c, + struct options *options, struct buffer *buf, unsigned int permission_mask, unsigned int *option_types_found, - struct env_set *es); + struct env_set *es, + bool is_update); void options_detach(struct options *o); diff --git a/src/openvpn/options_util.c b/src/openvpn/options_util.c index fea4c3d..48d53a4 100644 --- a/src/openvpn/options_util.c +++ b/src/openvpn/options_util.c @@ -30,6 +30,8 @@ #include "options_util.h" +#include "push.h" + const char * parse_auth_failed_temp(struct options *o, const char *reason) { @@ -145,3 +147,174 @@ return (int) i; } + +static const char *updatable_options[] =3D { + "block-ipv6", + "block-outside-dns", + "dhcp-option", + "dns", + "ifconfig", + "ifconfig-ipv6", + "push-continuation", + "redirect-gateway", + "redirect-private", + "route", + "route-gateway", + "route-ipv6", + "route-metric", + "topology", + "tun-mtu", + "keepalive" +}; + +/** + * @brief Checks the formatting and validity of options inside push-update= messages. + * + * This function is used in `apply_pull_filter()` to validate and process = options + * in push-update messages. It performs the following checks: + * - Determines if the options are updatable. + * - Checks for the presence of the `-` flag, which indicates that the opt= ion + * should be removed. + * - Checks for the `?` flag, which marks the option as optional and suppr= esses + * errors if the client cannot update it. + * - Modifies the original string (`*line`) by removing the `'-'` and `'?'= ` flags + * after validating them and updating the appropriate flags in the `flag= s` variable. + * - `-?option`, `-option`, `?option` are valid formats, `?-option` is not= a valid format. + * + * @param line A pointer to an option string. This string is the option be= ing validated. + * @param flags A pointer where flags will be stored: + * - `PUSH_OPT_TO_REMOVE`: Set if the `-` flag is present. + * - `PUSH_OPT_OPTIONAL`: Set if the `?` flag is present. + * + * @return true if the flags and option combination are valid. + * @return false if: + * - The `-` and `?` flags are not formatted correctly. + * - The `line` parameter is empty or `NULL`. + * - The `?` flag is absent and the option is not updatable. + */ +static bool +check_push_update_option_flags(char **line, unsigned int *flags) +{ + if (!line || !*line || !**line) + { + return false; + } + *flags =3D 0; + bool opt_is_updatable =3D false; + char *str =3D *line; + char c =3D **line; + + if (c =3D=3D '-') + { + if (!(str)[1]) + { + return false; + } + *flags |=3D PUSH_OPT_TO_REMOVE; + c =3D *(++(str)); + } + if (c =3D=3D '?') + { + if (!(str)[1] || (str)[1] =3D=3D '-') + { + return false; + } + *flags |=3D PUSH_OPT_OPTIONAL; + c =3D *(++(str)); + } + + /* Skip '?' and '-' if they are present */ + size_t len =3D strlen(str); + memmove(*line, str, len); + (*line)[len] =3D '\0'; + str =3D *line; + + int count =3D sizeof(updatable_options)/sizeof(char *); + for (int i =3D 0; i < count; ++i) + { + size_t opt_len =3D strlen(updatable_options[i]); + if (len < opt_len) + { + continue; + } + if (!strncmp(str, updatable_options[i], opt_len) + && (!str[opt_len] || str[opt_len] =3D=3D ' ')) + { + opt_is_updatable =3D true; + break; + } + } + + if (!opt_is_updatable) + { + if (*flags & PUSH_OPT_OPTIONAL) + { + msg(D_PUSH, "Pushed option is not updatable: '%s'", *line); + return true; + } + else + { + msg(M_WARN, "Pushed option is not updatable: '%s'. Restarting.= ", *line); + return false; + } + } + + return true; +} + +bool +apply_pull_filter(const struct options *o, char *line, bool is_update, uns= igned int *push_update_option_flags) +{ + struct pull_filter *f; + + if (!o->pull_filter_list && !(is_update)) + { + return true; + } + + /* skip leading spaces matching the behaviour of parse_line */ + while (isspace(*line)) + { + line++; + } + + if (is_update) + { + if (!check_push_update_option_flags(&line, push_update_option_flag= s)) + { + return false; + } + if (!o->pull_filter_list) + { + return true; + } + } + + for (f =3D o->pull_filter_list->head; f; f =3D f->next) + { + if (f->type =3D=3D PUF_TYPE_ACCEPT && strncmp(line, f->pattern, f-= >size) =3D=3D 0) + { + msg(D_LOW, "Pushed option accepted by filter: '%s'", line); + return true; + } + else if (f->type =3D=3D PUF_TYPE_IGNORE && strncmp(line, f->patter= n, f->size) =3D=3D 0) + { + msg(D_PUSH, "Pushed option removed by filter: '%s'", line); + return true; + } + else if (f->type =3D=3D PUF_TYPE_REJECT && strncmp(line, f->patter= n, f->size) =3D=3D 0) + { + if (is_update && (*push_update_option_flags & PUSH_OPT_OPTIONA= L)) + { + msg(D_PUSH, "Pushed option removed by filter: '%s'", line); + return true; + } + else + { + msg(M_WARN, "Pushed option rejected by filter: '%s'. Resta= rting.", line); + return false; + } + } + } + return true; +} diff --git a/src/openvpn/options_util.h b/src/openvpn/options_util.h index f34d997..c5f62db 100644 --- a/src/openvpn/options_util.h +++ b/src/openvpn/options_util.h @@ -50,4 +50,18 @@ int atoi_warn(const char *str, int msglevel); +/** + * Filter an option line by all pull filters. + * + * If a match is found, the line is modified depending on + * the filter type, and returns true. If the filter type is + * reject, SIGUSR1 is triggered and the return value is false. + * In that case the caller must end the push processing. + */ +bool +apply_pull_filter(const struct options *o, + char *line, + bool is_update, + unsigned int *push_update_option_flags); + #endif /* ifndef OPTIONS_UTIL_H_ */ diff --git a/src/openvpn/push.c b/src/openvpn/push.c index c97ce28..a40a28e 100644 --- a/src/openvpn/push.c +++ b/src/openvpn/push.c @@ -39,8 +39,6 @@ #include "ssl_util.h" #include "options_util.h" -static char push_reply_cmd[] =3D "PUSH_REPLY"; - /* * Auth username/password * @@ -519,21 +517,31 @@ { msg(D_PUSH_ERRORS, "WARNING: Received bad push/pull message: %s", = sanitize_control_message(BSTR(buffer), &gc)); } - else if (status =3D=3D PUSH_MSG_REPLY || status =3D=3D PUSH_MSG_CONTIN= UATION) + else if (status =3D=3D PUSH_MSG_REPLY || status =3D=3D PUSH_MSG_UPDATE= || status =3D=3D PUSH_MSG_CONTINUATION) { c->options.push_option_types_found |=3D option_types_found; /* delay bringing tun/tap up until --push parms received from remo= te */ - if (status =3D=3D PUSH_MSG_REPLY) + if (status =3D=3D PUSH_MSG_REPLY || status =3D=3D PUSH_MSG_UPDATE) { if (!options_postprocess_pull(&c->options, c->c2.es)) { goto error; } - if (!do_up(c, true, c->options.push_option_types_found)) + if (status =3D=3D PUSH_MSG_REPLY) { - msg(D_PUSH_ERRORS, "Failed to open tun/tap interface"); - goto error; + if (!do_up(c, true, c->options.push_option_types_found)) + { + msg(D_PUSH_ERRORS, "Failed to open tun/tap interface"); + goto error; + } + } + else + { + if (!option_types_found) + { + msg(M_WARN, "No updatable options found in incoming PU= SH_UPDATE message"); + } } } event_timeout_clear(&c->c2.push_request_interval); @@ -1058,11 +1066,13 @@ md_ctx_init(c->c2.pulled_options_state, "SHA256"); c->c2.pulled_options_digest_init_done =3D true; } - if (apply_push_options(&c->options, + if (apply_push_options(c, + &c->options, buf, permission_mask, option_types_found, - c->c2.es)) + c->c2.es, + false)) { push_update_digest(c->c2.pulled_options_state, &buf_orig, &c->options); @@ -1113,6 +1123,12 @@ return process_incoming_push_reply(c, permission_mask, option_types_found, &buf); } + else if (honor_received_options + && buf_string_compare_advance(&buf, push_update_cmd)) + { + return process_incoming_push_update(c, permission_mask, + option_types_found, &buf); + } else { return PUSH_MSG_ERROR; diff --git a/src/openvpn/push.h b/src/openvpn/push.h index 6af0853..4643c36 100644 --- a/src/openvpn/push.h +++ b/src/openvpn/push.h @@ -33,9 +33,42 @@ #define PUSH_MSG_AUTH_FAILURE 4 #define PUSH_MSG_CONTINUATION 5 #define PUSH_MSG_ALREADY_REPLIED 6 +#define PUSH_MSG_UPDATE 7 + +#define push_reply_cmd "PUSH_REPLY" +#define push_update_cmd "PUSH_UPDATE" + +/* Push-update options flags */ +#define PUSH_OPT_TO_REMOVE (1<<0) +#define PUSH_OPT_OPTIONAL (1<<1) int process_incoming_push_request(struct context *c); +/** + * @brief Handles the receiving of a push-update message and applies updat= es to the specified options. + * + * This function processes a push-update message, validating its content a= nd applying updates + * to the options specified in the message. It also handles split messages= if the complete + * message has not yet been received. + * + * @param c The context for the operation. + * @param permission_mask The permission mask specifying which options are= allowed to be pulled. + * @param option_types_found A pointer to a variable that will be filled w= ith the types of options + * found in the message. + * @param buf A buffer containing the received message. + * + * @return + * - `PUSH_MSG_UPDATE`: The message was processed successfully, and the up= dates were applied. + * - `PUSH_MSG_CONTINUATION`: The message is a fragment of a larger messag= e, and the program is + * waiting for the final part. + * - `PUSH_MSG_ERROR`: An error occurred during message processing, or the= message is invalid. + */ + +int process_incoming_push_update(struct context *c, + unsigned int permission_mask, + unsigned int *option_types_found, + struct buffer *buf); + int process_incoming_push_msg(struct context *c, const struct buffer *buffer, bool honor_received_options, diff --git a/src/openvpn/push_util.c b/src/openvpn/push_util.c new file mode 100644 index 0000000..b4d1e8b --- /dev/null +++ b/src/openvpn/push_util.c @@ -0,0 +1,44 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "push.h" + +int +process_incoming_push_update(struct context *c, + unsigned int permission_mask, + unsigned int *option_types_found, + struct buffer *buf) +{ + int ret =3D PUSH_MSG_ERROR; + const uint8_t ch =3D buf_read_u8(buf); + if (ch =3D=3D ',') + { + if (apply_push_options(c, + &c->options, + buf, + permission_mask, + option_types_found, + c->c2.es, + true)) + { + switch (c->options.push_continuation) + { + case 0: + case 1: + ret =3D PUSH_MSG_UPDATE; + break; + + case 2: + ret =3D PUSH_MSG_CONTINUATION; + break; + } + } + } + else if (ch =3D=3D '\0') + { + ret =3D PUSH_MSG_UPDATE; + } + + return ret; +} diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 99b5c07..1926691 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -1990,6 +1990,9 @@ /* support for exit notify via control channel */ iv_proto |=3D IV_PROTO_CC_EXIT_NOTIFY; + /* support push-updates */ + iv_proto |=3D IV_PROTO_PUSH_UPDATE; + if (session->opt->pull) { /* support for receiving push_reply before sending diff --git a/src/openvpn/ssl.h b/src/openvpn/ssl.h index c32cb6c..334b068 100644 --- a/src/openvpn/ssl.h +++ b/src/openvpn/ssl.h @@ -114,6 +114,9 @@ /** Supports the --dns option after all the incompatible changes */ #define IV_PROTO_DNS_OPTION_V2 (1<<11) +/** Supports push-update */ +#define IV_PROTO_PUSH_UPDATE (1<<12) + /* Default field in X509 to be username */ #define X509_USERNAME_FIELD_DEFAULT "CN" diff --git a/tests/unit_tests/openvpn/Makefile.am b/tests/unit_tests/openvp= n/Makefile.am index 471389b..6fb7843 100644 --- a/tests/unit_tests/openvpn/Makefile.am +++ b/tests/unit_tests/openvpn/Makefile.am @@ -11,7 +11,7 @@ endif test_binaries +=3D crypto_testdriver packet_id_testdriver auth_token_testd= river ncp_testdriver misc_testdriver \ - pkt_testdriver ssl_testdriver user_pass_testdriver + pkt_testdriver ssl_testdriver user_pass_testdriver push_update_msg_testdr= iver if HAVE_LD_WRAP_SUPPORT if !WIN32 @@ -314,3 +314,21 @@ $(top_srcdir)/src/openvpn/win32-util.c \ $(top_srcdir)/src/openvpn/platform.c \ $(top_srcdir)/src/openvpn/list.c + +push_update_msg_testdriver_CFLAGS =3D -I$(top_srcdir)/src/openvpn \ + -I$(top_srcdir)/src/compat \ + -I$(top_srcdir)/tests/unit_tests/openvpn \ + @TEST_CFLAGS@ + +push_update_msg_testdriver_LDFLAGS =3D \ + @TEST_LDFLAGS@ \ + -L$(top_srcdir)/src/openvpn + +push_update_msg_testdriver_SOURCES =3D test_push_update_msg.c \ + mock_msg.c \ + mock_get_random.c \ + $(top_srcdir)/src/openvpn/buffer.c \ + $(top_srcdir)/src/openvpn/platform.c \ + $(top_srcdir)/src/openvpn/push_util.c \ + $(top_srcdir)/src/openvpn/options_util.c \ + $(top_srcdir)/src/openvpn/otime.c \ No newline at end of file diff --git a/tests/unit_tests/openvpn/test_push_update_msg.c b/tests/unit_t= ests/openvpn/test_push_update_msg.c new file mode 100644 index 0000000..d0876bc --- /dev/null +++ b/tests/unit_tests/openvpn/test_push_update_msg.c @@ -0,0 +1,245 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include "push.h" +#include "options_util.h" + +/* mocks */ + +unsigned int +pull_permission_mask(const struct context *c) +{ + unsigned int flags =3D + OPT_P_UP + | OPT_P_ROUTE_EXTRAS + | OPT_P_SOCKBUF + | OPT_P_SOCKFLAGS + | OPT_P_SETENV + | OPT_P_SHAPER + | OPT_P_TIMER + | OPT_P_COMP + | OPT_P_PERSIST + | OPT_P_MESSAGES + | OPT_P_EXPLICIT_NOTIFY + | OPT_P_ECHO + | OPT_P_PULL_MODE + | OPT_P_PEER_ID + | OPT_P_NCP + | OPT_P_PUSH_MTU + | OPT_P_ROUTE + | OPT_P_DHCPDNS; + return flags; +} + +bool +apply_push_options(struct context *c, + struct options *options, + struct buffer *buf, + unsigned int permission_mask, + unsigned int *option_types_found, + struct env_set *es, + bool is_update) +{ + char line[OPTION_PARM_SIZE]; + + while (buf_parse(buf, ',', line, sizeof(line))) + { + unsigned int push_update_option_flags =3D 0; + + if (!apply_pull_filter(options, line, is_update, &push_update_opti= on_flags)) + { + msg(M_WARN, "Offending option received from server"); + return false; + } + /* + * No need to test also the application part here + * (add_option/remove_option/update_option) + */ + } + return true; +} + +int +process_incoming_push_msg(struct context *c, + const struct buffer *buffer, + bool honor_received_options, + unsigned int permission_mask, + unsigned int *option_types_found) +{ + struct buffer buf =3D *buffer; + + if (buf_string_compare_advance(&buf, "PUSH_REQUEST")) + { + return PUSH_MSG_REQUEST; + } + else if (honor_received_options + && buf_string_compare_advance(&buf, push_reply_cmd)) + { + return PUSH_MSG_REPLY; + } + else if (honor_received_options + && buf_string_compare_advance(&buf, push_update_cmd)) + { + return process_incoming_push_update(c, permission_mask, + option_types_found, &buf); + } + else + { + return PUSH_MSG_ERROR; + } +} + +/* tests */ + +static void +test_incoming_push_message_basic(void **state) +{ + struct context *c =3D *state; + struct buffer buf =3D alloc_buf(256); + const char *update_msg =3D "PUSH_UPDATE,dhcp-option DNS 8.8.8.8, route= 0.0.0.0 0.0.0.0 10.10.10.1"; + buf_write(&buf, update_msg, strlen(update_msg)); + unsigned int option_types_found =3D 0; + + assert_int_equal(process_incoming_push_msg(c, &buf, c->options.pull, p= ull_permission_mask(c), &option_types_found), PUSH_MSG_UPDATE); + + free_buf(&buf); +} + +static void +test_incoming_push_message_error1(void **state) +{ + struct context *c =3D *state; + struct buffer buf =3D alloc_buf(256); + const char *update_msg =3D "PUSH_UPDATEerr,dhcp-option DNS 8.8.8.8"; + buf_write(&buf, update_msg, strlen(update_msg)); + unsigned int option_types_found =3D 0; + + assert_int_equal(process_incoming_push_msg(c, &buf, c->options.pull, p= ull_permission_mask(c), &option_types_found), PUSH_MSG_ERROR); + + free_buf(&buf); +} + + +static void +test_incoming_push_message_error2(void **state) +{ + struct context *c =3D *state; + struct buffer buf =3D alloc_buf(256); + const char *update_msg =3D "PUSH_UPDATE ,dhcp-option DNS 8.8.8.8"; + buf_write(&buf, update_msg, strlen(update_msg)); + unsigned int option_types_found =3D 0; + + assert_int_equal(process_incoming_push_msg(c, &buf, c->options.pull, p= ull_permission_mask(c), &option_types_found), PUSH_MSG_ERROR); + + free_buf(&buf); +} + +static void +test_incoming_push_message_1(void **state) +{ + struct context *c =3D *state; + struct buffer buf =3D alloc_buf(256); + const char *update_msg =3D "PUSH_UPDATE, -?dns, route something, ?dhcp= -option DNS 8.8.8.8"; + buf_write(&buf, update_msg, strlen(update_msg)); + unsigned int option_types_found =3D 0; + + assert_int_equal(process_incoming_push_msg(c, &buf, c->options.pull, p= ull_permission_mask(c), &option_types_found), PUSH_MSG_UPDATE); + + free_buf(&buf); +} + +static void +test_incoming_push_message_bad_format(void **state) +{ + struct context *c =3D *state; + struct buffer buf =3D alloc_buf(256); + const char *update_msg =3D "PUSH_UPDATE, -dhcp-option, ?-dns"; + buf_write(&buf, update_msg, strlen(update_msg)); + unsigned int option_types_found =3D 0; + + assert_int_equal(process_incoming_push_msg(c, &buf, c->options.pull, p= ull_permission_mask(c), &option_types_found), PUSH_MSG_ERROR); + + free_buf(&buf); +} + +static void +test_incoming_push_message_not_updatable_option(void **state) +{ + struct context *c =3D *state; + struct buffer buf =3D alloc_buf(256); + const char *update_msg =3D "PUSH_UPDATE, dev tun"; + buf_write(&buf, update_msg, strlen(update_msg)); + unsigned int option_types_found =3D 0; + + assert_int_equal(process_incoming_push_msg(c, &buf, c->options.pull, p= ull_permission_mask(c), &option_types_found), PUSH_MSG_ERROR); + + free_buf(&buf); +} + +static void +test_incoming_push_message_mix(void **state) +{ + struct context *c =3D *state; + struct buffer buf =3D alloc_buf(256); + const char *update_msg =3D "PUSH_UPDATE,-dhcp-option, route 10.10.10.0= , dhcp-option DNS 1.1.1.1, route 10.11.12.0, dhcp-option DOMAIN corp.local,= keepalive 10 60"; + buf_write(&buf, update_msg, strlen(update_msg)); + unsigned int option_types_found =3D 0; + + assert_int_equal(process_incoming_push_msg(c, &buf, c->options.pull, p= ull_permission_mask(c), &option_types_found), PUSH_MSG_UPDATE); + + free_buf(&buf); +} + +static void +test_incoming_push_message_mix2(void **state) +{ + struct context *c =3D *state; + struct buffer buf =3D alloc_buf(256); + const char *update_msg =3D "PUSH_UPDATE,-dhcp-option,dhcp-option DNS 8= .8.8.8,redirect-gateway local,route 192.168.1.0 255.255.255.0"; + buf_write(&buf, update_msg, strlen(update_msg)); + unsigned int option_types_found =3D 0; + + assert_int_equal(process_incoming_push_msg(c, &buf, c->options.pull, p= ull_permission_mask(c), &option_types_found), PUSH_MSG_UPDATE); + + free_buf(&buf); +} + +static int +setup(void **state) +{ + struct context *c =3D calloc(1, sizeof(struct context)); + c->options.pull =3D true; + c->options.route_nopull =3D false; + *state =3D c; + return 0; +} + +static int +teardown(void **state) +{ + struct context *c =3D *state; + free(c); + return 0; +} + +int +main(void) +{ + const struct CMUnitTest tests[] =3D { + cmocka_unit_test_setup_teardown(test_incoming_push_message_basic, = setup, teardown), + cmocka_unit_test_setup_teardown(test_incoming_push_message_error1,= setup, teardown), + cmocka_unit_test_setup_teardown(test_incoming_push_message_error2,= setup, teardown), + cmocka_unit_test_setup_teardown(test_incoming_push_message_not_upd= atable_option, setup, teardown), + cmocka_unit_test_setup_teardown(test_incoming_push_message_1, setu= p, teardown), + cmocka_unit_test_setup_teardown(test_incoming_push_message_bad_for= mat, setup, teardown), + cmocka_unit_test_setup_teardown(test_incoming_push_message_mix, se= tup, teardown), + cmocka_unit_test_setup_teardown(test_incoming_push_message_mix2, s= etup, teardown) + }; + + return cmocka_run_group_tests(tests, NULL, NULL); +} -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/808?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I6ecd4cb47571cc8c20e46de8595c742aeec6064a Gerrit-Change-Number: 808 Gerrit-PatchSet: 12 Gerrit-Owner: mrbff Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-Reviewer: stipa Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld Gerrit-Attention: stipa Gerrit-Attention: mrbff Gerrit-MessageType: newpatchset --cuFnYZCgxVI= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, mrbff, stipa.

mrbff uploaded patch set #12 to this change.

View Change

The following approvals got outdated and were removed: Code-Review+2 by stipa, Code-Review-1 by flichtenheld

The change is n= o longer submittable: Code-Review and checks~ChecksSubmitRule are unsatisfi= ed now.

PUSH_UPDATE: Allow OpenVPN in client mode to receive and handle PUS=
H UPDATE control messages to allow options updating at runtime.

* Ad= ded IV_PROTO_PUSH_UPDATE flag bit to support push-updates.
* Added proce= ss_incoming_push_update(), in a separate file to create tests more easily.<= br>* Modified incoming_push_message(), process_incoming_push_msg(), apply_p= ush_options(),
apply_pull_filter() to process also push-update message= s.
* Added the check_push_update_option_flags() function used in apply_p= ull_filter() to
check options formatting inside push-update messages, = if the options are updatables
and to check for '?' and '-&= #39; flags that may be present in front of the options.
The '-'= ; flag is used to indicate that the option in question should be removed, while the '?' indicates that the option is optional and to do n= ot generate
errors if the client cannot update that option.
For m= ore info you can read the RFC at https://github.com/OpenVPN/openvpn-rfc .* Created some unit tests for the push-update message handling in test_pu= sh_update_msg.c.

Change-Id: I6ecd4cb47571cc8c20e46de8595c742aeec6064= a
Signed-off-by: Marco Baffo <marco@...2726...>
---
M CMakeL= ists.txt
M src/openvpn/Makefile.am
M src/openvpn/forward.c
M src/o= penvpn/init.c
M src/openvpn/options.c
M src/openvpn/options.h
M sr= c/openvpn/options_util.c
M src/openvpn/options_util.h
M src/openvpn/p= ush.c
M src/openvpn/push.h
A src/openvpn/push_util.c
M src/openvpn= /ssl.c
M src/openvpn/ssl.h
M tests/unit_tests/openvpn/Makefile.am
= A tests/unit_tests/openvpn/test_push_update_msg.c
15 files changed, 643 = insertions(+), 112 deletions(-)

git pull ssh://gerrit.openvpn.net=
:29418/openvpn refs/changes/08/808/12
diff --git a/CMakeLists.txt b=
/CMakeLists.txt
index b04adce..f597a89 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -506,6 +506,7 @@
src/openvpn/ps.c
src/openvpn/ps.h
src/openvpn/push.c
+ src/openvpn/push_util.c

src/openvpn/push.h
src/openvpn/pushli= st.h
src/openvpn/reflect_filter.c
@@ -= 622,6 +623,7 @@
"test_provider" "test_ssl"
"test_u= ser_pass"
+ = "test_push_update_msg"
)

if (WIN32)
@@ -824,6 +826,14 @@<= /span>
src/openvpn/run_command.c
= )

= + target_sources(test_push_update_msg PRIVATE
+ tests/unit_tests/openvpn/mock_msg.c

+ tests/unit_tes= ts/openvpn/mock_get_random.c
+ src/openvpn/push_util.c
+ src/openvpn/options_util.c
+ src/openvpn/otime.c
+ )
+
if (TARGET test_argv)=
target_link_options(test_argv PRIVATE -Wl,--wrap=3Dparse= _line)
target_sources(test_argv PRIVATE
= diff --git a/src/openvpn/Makefile.am b/src/openvpn/Makefile.am=
index 37af683..e349282 100644
--- a/src/openvpn/M= akefile.am
+++ b/src/openvpn/Makefile.am
@@= -116,7 +116,7 @@
proto.c proto.h \
pro= xy.c proxy.h \
ps.c ps.h \
- push.c push.h \
+ push.c push_util.c push.h \
pushlist= .h \
reflect_filter.c reflect_filter.h \
= reliable.c reliable.h \
diff --git a/src/openvpn/forward.= c b/src/openvpn/forward.c
index af1d008..59df966 100644

--- a/src/openvpn/forward.c
+++ b/src/openvpn/= forward.c
@@ -2038,7 +2038,7 @@
}

/* check for incoming control messages o= n the control channel like
- * push request/reply, or authentication failure and 2FA messages = */
+ * push reque= st/reply/update, or authentication failure and 2FA messages */
if (tls_test_payload_len(c->c2.tls_multi) > 0)

{
check_incoming_control_channel(c);
diff --git a/src/openvpn/init.c b/src/openvpn/init.c
<= span>index 1be205b..cd94e6e 100644

--- a/src/openvpn/init.c=
+++ b/src/openvpn/init.c
@@ -2048,8 +2048,= 8 @@
/* possibly add routes */
= if ((route_order(c->c1.tuntap) =3D=3D ROUTE_AFTER_TUN) && = (!c->options.route_delay_defined))
{
= - int status =3D do_ro= ute(&c->options, c->c1.route_list, c->c1.route_ipv6_list,
- = c->c1.tuntap, c->plugins, c->c2.es, &c->net_ctx);
+ bool stat= us =3D do_route(&c->options, c->c1.route_list, c->c1.route_ipv= 6_list,
+ = c->c1.tuntap, c->plugins, c->c2.es, &c-= >net_ctx);
*error_flags |=3D (status ? 0 : = ISC_ROUTE_ERRORS);
}

<= span>diff --git a/src/openvpn/options.c b/src/openvpn/options.c

<= span>index 67ef55b..bf29c56 100644

--- a/src/openvpn/option= s.c
+++ b/src/openvpn/options.c
@@ -65,6 +6= 5,7 @@
#include <ctype.h>
#include "memdbg.h"
+#include "options_util.h"

const char title_string[] =3D
PACKAGE_S= TRING
@@ -941,24 +942,6 @@
} }

-struct pull_filter
-#define PUF_TYPE_= UNDEF 0 /**< undefined filter type */
-#define PUF_TYPE_ACCEPT 1 /**< filter type to = accept a matching option */
-#define PUF_TYPE_IGNORE 2 /**< filter type to ignore a matching= option */
-#define PUF= _TYPE_REJECT 3 /**< filter type to reject and trigger SIGUSR1 */
- int type;
- int size;

- char *pattern;
- struct pull_filter *next;
-};

-
-= struct pull_filter_list
-{
- struct pull_fi= lter *head;
- struct= pull_filter *tail;
-};=
-
#if= ndef ENABLE_SMALL

static const char *
@@ -5433,84 +5416,6 @@
}
}


-= /**
- * Filter an optio= n line by all pull filters.
- *
- * If a match= is found, the line is modified depending on
- * the filter type, and returns true. If the filter = type is
- * reject, SIG= USR1 is triggered and the return value is false.
- * In that case the caller must end the push pro= cessing.
- */-static bool
-apply_pull_filter(const struct options *o= , char *line)
-{=
- struct pull_filter *f;
-
- if (!o->pull_filter_list)
= - {
- return true;
- }
-
- /* skip= leading spaces matching the behaviour of parse_line */
- while (isspace(*line))
- {

- line++;
- }
= -
- for (f =3D o->= ;pull_filter_list->head; f; f =3D f->next)
- {
- if (f->type =3D=3D PUF_TYPE_ACCEPT && strncmp= (line, f->pattern, f->size) =3D=3D 0)
- {
- msg(D_LOW, "Pushed option accepted by filter: &#= 39;%s'", line);
- }
- = else if (f->type =3D=3D PUF_TYPE_IGNORE && strncmp(line, f->= ;pattern, f->size) =3D=3D 0)
- {
- = msg(D_PUSH, "Pushed option removed by filter: '%s'&q= uot;, line);
- = *line =3D '\0';
- return true;
- }
- = else if (f->type =3D=3D PUF_TYPE_REJECT && strncmp(line, f-&= gt;pattern, f->size) =3D=3D 0)
- {
-= msg(M_WARN, "Pushed option rejected by filter: '%s'= ;. Restarting.", line);
- *line =3D '\0';
- throw_signal_soft(SIGUSR1, "Offending= option received from server");
- return false;
- }
- }
- retur= n true;
-}
-
-bool
- struct buffer *buf,
<= span style=3D"color: hsl(0, 100%, 40%);">- unsigned int p= ermission_mask,
- = unsigned int *option_types_found,
- struct env_set *es)
<= span style=3D"color: hsl(0, 100%, 40%);">-{
- char line[OPTION_PARM_SIZE];
- int line_num =3D 0;
- const char *file =3D "[PUSH-OPT= IONS]";
- const= int msglevel =3D D_PUSH_ERRORS|M_OPTERR;
-
- = while (buf_parse(buf, ',', line, sizeof(line)))
- {
- char *p[MAX_PARMS+1];
- CLEAR(p);
- ++line_num;
- if (!apply_pull_filter(options, line))
- {
- return false; /* Cause push= /pull error and stop push processing */
- }
- if (parse_line(line, p, SIZE(p)-1, file, line_num, msglevel, = &options->gc))
-= {
- = add_option(options, p, false, file, line_num, 0, msglevel,
- permission_mask= , option_types_found, es);
- }
- }
- return true;=
-}
-
void
options_= server_import(struct options *o,
con= st char *filename,
@@ -5644,6 +5549,44 @@
= return options->forward_compatible ? M_WARN : msglevel;
}


+bool
+apply_push= _options(struct context *c,
+ struct options *options,
+ struct buffer *buf,

+ uns= igned int permission_mask,
+ unsigned int *option_types_found,
+ struct env_set *= es,
+ = bool is_update)
+{=
+ char line[OPTIO= N_PARM_SIZE];
+ in= t line_num =3D 0;
+ = const char *file =3D "[PUSH-OPTIONS]";
+ const int msglevel =3D D_PUSH_ERRORS|M_O= PTERR;
+
+ while (buf_parse(buf, ',= ', line, sizeof(line)))
+ {
+ = char *p[MAX_PARMS+1];
+ CLEAR(p);
+ ++line_num;
+ unsigned int push_update_option_flags =3D 0;
+
+ if (!apply_pull_filter(options, line, is_update, &a= mp;push_update_option_flags))
+ {
+= throw_signal_soft(SIGUSR1, "Offending option received from= server");
+ = return false; /* Cause push/pull error and stop push processing */<= /span>
+ }
= + if (parse_line(line, p= , SIZE(p)-1, file, line_num, msglevel, &options->gc))
+ {

+ if (!is_update)
+ {
+ add_option(options, p, fa= lse, file, line_num, 0, msglevel,
+ permission_mask, option_types_foun= d, es);
+ = }
+ }+ }
+ return true;
+}
+
static void
set_user_script= (struct options *options,
const char **scr= ipt,
diff --git a/src/openvpn/options.h b/src/openvpn/optio= ns.h
index fa617c8..cb3a589 100644
--- a/sr= c/openvpn/options.h
+++ b/src/openvpn/options.h
<= span>@@ -793,6 +793,33 @@
#define MAN_CLIENT_AUTH_ENABLED(= opt) (false)
#endif

+/*
+ * some PUSH_UPDATE options
+ */
+#define OPT_P_U_ROUTE (1<<0)
+#define OPT_P_U_ROUTE6 (1<&l= t;1)
+#define OPT_P_U= _DNS (1<<2)
+#define OPT_P_U_DHCP (1<<3)
+#define OPT_P_U_REDIR_GATEWAY (1<&l= t;4)
+
+struct pull_filter
+{
+#define PUF_TYPE_UNDEF 0 /**< undefined filter= type */
+#define PUF= _TYPE_ACCEPT 1 /**< filter type to accept a matching option */=
+#define PUF_TYPE_IGNORE 2 = /**< filter type to ignore a matching option */
+#define PUF_TYPE_REJECT 3 /**< filt= er type to reject and trigger SIGUSR1 */
+ int type;
+ int size;
+ char *pattern;
+ struct pull_filter *next;
+};
= +
+struct pull_filter= _list
+{
+ struct pull_filter *head;
+ struct pull_filter= *tail;
+};+
void parse_= argv(struct options *options,
const int ar= gc,
char *argv[],
@@ -861,= 11 +888,13 @@

void pre_connect_restore(s= truct options *o, struct gc_arena *gc);

-bool apply_push_options(struct options = *options,
+bool apply= _push_options(struct context *c,
+ struct options *options,
struct buffer *buf,
= unsigned int permission_mask,
= unsigned int *option_types_found,
- struct env_set *es);+ stru= ct env_set *es,
+ = bool is_update);

voi= d options_detach(struct options *o);

diff= --git a/src/openvpn/options_util.c b/src/openvpn/options_util.c
= index fea4c3d..48d53a4 100644
--- a/src/openvpn/optio= ns_util.c
+++ b/src/openvpn/options_util.c
= @@ -30,6 +30,8 @@

#include "options= _util.h"

+#include "push.h"
+
const char *
parse_a= uth_failed_temp(struct options *o, const char *reason)
{
@@ -145,3 +147,174 @@

= return (int) i;
}
+
+sta= tic const char *updatable_options[] =3D {
+ "block-ipv6",
+ "block-outside-dns",
= + "dhcp-option",
+ "dns",<= /span>
+ "ifconfig&q= uot;,
+ "ifco= nfig-ipv6",
+ = "push-continuation",
+ "redirect-gateway",
+ "redirect-private",
+ "route",

+ "route-gateway",
+ "route-ipv6&= quot;,
+ "rou= te-metric",
+ = "topology",
+ "keepalive"
+};
+

+/**
+ * @brief Checks the formatting and va= lidity of options inside push-update messages.
+ *
+ * This function is used in `apply_pull_filter()` to validate and= process options
+ * = in push-update messages. It performs the following checks:
+ * - Determines if the options are u= pdatable.
+ * - Check= s for the presence of the `-` flag, which indicates that the option<= br>+ * should be removed.

+ * - Checks for the `?`= flag, which marks the option as optional and suppresses
+ * errors if the client cannot updat= e it.
+ * - Modifies = the original string (`*line`) by removing the `'-'` and `'?'= ;` flags
+ * after = validating them and updating the appropriate flags in the `flags` variable.=
+ * - `-?option`, `-= option`, `?option` are valid formats, `?-option` is not a valid format.

+ *
+ * @param line A pointer to an option st= ring. This string is the option being validated.
+ * @param flags A pointer where flags will be = stored:
+ * = - `PUSH_OPT_TO_REMOVE`: Set if the `-` flag is present.
+ * - `PUSH_OPT_OPTIONA= L`: Set if the `?` flag is present.
+ *
+ = * @return true if the flags and option combination are valid.
+ * @return false if:
+ * - The `-` and `?` fla= gs are not formatted correctly.
+ * - The `line` parameter is empty or `NULL`.+ * - The `?` flag is = absent and the option is not updatable.
+ */
+static bool
+chec= k_push_update_option_flags(char **line, unsigned int *flags)
+{
+ if (!line || !*line || !**line)
+ {
+ return false;
+ }
+ *flags =3D 0;
+ bool opt_is_updatable =3D false;
+ char *str =3D *line;
+ char c =3D **line;
+
+ if (c =3D=3D '-')
+ {
+ if (!(str)[1])
+ {
+ return false;
+ }
+ c =3D *(++(str));
+ }
+ if (c =3D=3D '?')
+ {
+ if (!(str)[1] || (str)[1] =3D=3D '-')
= + {
+ return false;
+ }
+ *flags |=3D PUSH_OPT_OPTIONAL;

+ c =3D *(++(str));=
+ }
+
+ /* Skip '?' and '-' if they are = present */
+ size_= t len =3D strlen(str);
+ (*line)[len] =3D '\0';
+ str =3D *line;
+
+ int count =3D sizeof(updatable_options)/sizeof(char *);<= br>+ for (int i =3D 0; i <= ; count; ++i)
+ {<= /span>
+ size_t opt_l= en =3D strlen(updatable_options[i]);
+ if (len < opt_len)
+ {
+ continue;
+ }
+ if (!strncmp(str, updatable_options[i], opt_len)+ && (!str[= opt_len] || str[opt_len] =3D=3D ' '))
+ {
+ opt_is_updatable =3D true;
+ break;
+ }
+ }
+
+ if (!= opt_is_updatable)
+ = {
+ if (*fla= gs & PUSH_OPT_OPTIONAL)
+ {
+ = msg(D_PUSH, "Pushed option is not updatable: '%s'&qu= ot;, *line);
+ = return true;
+ = }
+ else=
+ {+ msg(M_WARN, "= ;Pushed option is not updatable: '%s'. Restarting.", *line);
+ return fa= lse;
+ }
+ }
+
+ return true;
+}
+

+bool
+apply_pull_filter(const struct options= *o, char *line, bool is_update, unsigned int *push_update_option_flags)
+{
+ struct pull_filter *f;
+

+ if (!o->pull_filter_list && !(is_upda= te))
+ {+ return true;+ }
+
+ /* skip leading spaces matching the behaviour of parse_l= ine */
+ while (is= space(*line))
+ {<= /span>
+ line++;
+ }
+
+ if (is_update)
+ {
+ {<= /span>
+ return f= alse;
+ }
+ if (!o->pull_= filter_list)
+ = {
+ retur= n true;
+ }
+ }
+
+ for (f =3D o->pull_filter_list->head; f; f = =3D f->next)
+ = {
+ if (f->= type =3D=3D PUF_TYPE_ACCEPT && strncmp(line, f->pattern, f->s= ize) =3D=3D 0)
+ = {
+ msg= (D_LOW, "Pushed option accepted by filter: '%s'", line);<= /span>
+ return t= rue;
+ }
+ else if (f->ty= pe =3D=3D PUF_TYPE_IGNORE && strncmp(line, f->pattern, f->siz= e) =3D=3D 0)
+ = {
+ msg(D= _PUSH, "Pushed option removed by filter: '%s'", line);
+ return tru= e;
+ }<= br>+ else if (f->type= =3D=3D PUF_TYPE_REJECT && strncmp(line, f->pattern, f->size)= =3D=3D 0)
+ {=
+ if (is_= update && (*push_update_option_flags & PUSH_OPT_OPTIONAL))
+ {
= + msg(D_PUSH, &q= uot;Pushed option removed by filter: '%s'", line);
<= span style=3D"color: hsl(120, 100%, 40%);">+ return true;
+ }+ else
<= span style=3D"color: hsl(120, 100%, 40%);">+ {

+ msg(M_WARN, "Pus= hed option rejected by filter: '%s'. Restarting.", line);
+ return f= alse;
+ }<= /span>
+ }
= + }
+ return true;
+}
diff --git a/src/openvpn/opti= ons_util.h b/src/openvpn/options_util.h
index f34d997..c5f6= 2db 100644
--- a/src/openvpn/options_util.h
+++ b/src/openvpn/options_util.h

@@ -50,4 +50,18 @@=
int
atoi_warn(const char *str, int msglevel);

+/**=
+ * Filter an option= line by all pull filters.
+ *
+ * If a ma= tch is found, the line is modified depending on
+ * the filter type, and returns true. If the fi= lter type is
+ * reje= ct, SIGUSR1 is triggered and the return value is false.
+ * In that case the caller must end the= push processing.
+ *= /
+bool
+apply_pull_filter(const struct op= tions *o,

+ = char *line,
+= bool is_update,
+ unsigned int *push_update_option_flags);
+
#end= if /* ifndef OPTIONS_UTIL_H_ */
diff --git a/src/openvpn/pu= sh.c b/src/openvpn/push.c
index c97ce28..a40a28e 100644
--- a/src/openvpn/push.c
+++ b/src/openvpn/pus= h.c
@@ -39,8 +39,6 @@
#include "ssl_u= til.h"
#include "options_util.h"
=
-static char pu= sh_reply_cmd[] =3D "PUSH_REPLY";
-
/*
* Auth username= /password
*
@@ -519,21 +517,31 @@<= br> {
msg(D_PUSH_ERRORS, "WARNING: = Received bad push/pull message: %s", sanitize_control_message(BSTR(buf= fer), &gc));
}
- else if (status =3D=3D PUSH_MSG_REPLY || status =3D= =3D PUSH_MSG_CONTINUATION)
+ else if (status =3D=3D PUSH_MSG_REPLY || status =3D=3D PUSH_MSG_= UPDATE || status =3D=3D PUSH_MSG_CONTINUATION)
{
c->options.push_option_types_found |=3D option_types= _found;

/* delay bringing tun/ta= p up until --push parms received from remote */
- if (status =3D=3D PUSH_MSG_REPLY)<= br>+ if (status =3D=3D P= USH_MSG_REPLY || status =3D=3D PUSH_MSG_UPDATE)
{<= /span>
if (!options_postprocess_pull(&c->optio= ns, c->c2.es))
{
= goto error;
}
- if (!do_up(c, true, c->options.p= ush_option_types_found))
+ if (status =3D=3D PUSH_MSG_REPLY)
= {
- = msg(D_PUSH_ERRORS, "Failed to open tun/tap interface");- goto error;
+ if (!d= o_up(c, true, c->options.push_option_types_found))
+ {
+ msg(D_PUSH_ERRORS, &q= uot;Failed to open tun/tap interface");
+ goto error;
+ }
+ }
+ else
+ {
+ if (!option_types_found)
+ {

+ msg(M_WARN, &quo= t;No updatable options found in incoming PUSH_UPDATE message");=
+ } }
}
= event_timeout_clear(&c->c2.push_request_interval);
@= @ -1058,11 +1066,13 @@
md_ctx_init(c->c2.pu= lled_options_state, "SHA256");
c->= ;c2.pulled_options_digest_init_done =3D true;
}
- if (apply_push_o= ptions(&c->options,
+ if (apply_push_options(c,
+ &c->options,
buf,
= permission_mask,
= option_types_found,
- c->c2.es))
+ c->c2= .es,
+ = false))
{
= push_update_digest(c->c2.pulled_options_state, &buf_orig,
&c->options);
<= span>@@ -1113,6 +1123,12 @@

return process_incomin= g_push_reply(c, permission_mask,
= option_types_found, &buf);
}
+ else if (honor_rece= ived_options
+ = && buf_string_compare_advance(&buf, push_update_cmd))
+ {
+ return process_incoming_push_= update(c, permission_mask,
+ option_types_found, &= ;buf);
+ }<= br> else
{
return P= USH_MSG_ERROR;
diff --git a/src/openvpn/push.h b/src/openvp= n/push.h
index 6af0853..4643c36 100644
--- = a/src/openvpn/push.h
+++ b/src/openvpn/push.h
@@ -33,9 +33,42 @@

#define PUSH_MSG_AUTH_FAILURE 4<= /span>
#define PUSH_MSG_CONTINUATION 5
#defi= ne PUSH_MSG_ALREADY_REPLIED 6
+#define PUSH_MSG_UPDATE 7
+
+#define push_reply_cmd "PUSH_REPLY"
+#define push_update_cmd "PUSH_UPDATE= "
+
+/* Push-update options flags */<= /span>
+#define PUSH_OPT_TO_= REMOVE (1<<0)
+= #define PUSH_OPT_OPTIONAL (1<<1)

i= nt process_incoming_push_request(struct context *c);

+/**
+ * @brief Handles the receiving of a pus= h-update message and applies updates to the specified options.
+ *

+ * This function processes a push-update message,= validating its content and applying updates
+ * to the options specified in the message. It als= o handles split messages if the complete
+ * message has not yet been received.
+ *
+ * @param c The context for the operation.
= + * @param permission_mask The = permission mask specifying which options are allowed to be pulled.+ * @param option_types_found= A pointer to a variable that will be filled with the types of options
+ * = found in the message.
+ * @param buf A buffer containing the received message.
+ *

+ * @return
+ * - `PUSH_MSG_UPDATE`: The message was processed successf= ully, and the updates were applied.
+ * - `PUSH_MSG_CONTINUATION`: The message is a fragment of = a larger message, and the program is
+ * waiting for the final part.<= /span>
+ * - `PUSH_MSG_ERROR= `: An error occurred during message processing, or the message is invalid.<= /span>
+ */
+
+int process_incoming_push_update(struct context *c,
+ = unsigned int permission_mask,
+ unsigned int *option_t= ypes_found,
+ = struct buffer *buf);
+
int process_incoming_push_msg(s= truct context *c,
const stru= ct buffer *buffer,
bool hono= r_received_options,
diff --git a/src/openvpn/push_util.c b/= src/openvpn/push_util.c
new file mode 100644
index 0000000..b4d1e8b

--- /dev/null
+++ = b/src/openvpn/push_util.c
@@ -0,0 +1,44 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "push.h"
+
+int
+process_i= ncoming_push_update(struct context *c,
+ unsigned int permission_mas= k,
+ = unsigned int *option_types_found,
+ struct buffer *buf)<= /span>
+{
+ int ret =3D PUSH_MSG_ERROR;=
+ const uint8_t ch =3D b= uf_read_u8(buf);
+ = if (ch =3D=3D ',')
+ {
+ = if (apply_push_options(c,
+ &c->options,
+ buf,<= /span>
+ = permission_mask,
+ option_types_found,
+ c->= ;c2.es,
+ = true))
+ {
+ = switch (c->options.push_continuation)
+ {
+ case 0:
+ case 1:
+ ret =3D PUSH_MSG_UPDATE;=
+ = break;
+
<= span style=3D"color: hsl(120, 100%, 40%);">+ case 2:
<= br>+ ret =3D= PUSH_MSG_CONTINUATION;
+ break;
+ }
+ }
+ }=
+ else if (ch =3D= =3D '\0')
+ = {
+ ret =3D = PUSH_MSG_UPDATE;
+ = }
+
+ return ret;
+}
diff --git a/src/openv= pn/ssl.c b/src/openvpn/ssl.c
index 99b5c07..1926691 100644<= /span>
--- a/src/openvpn/ssl.c
+++ b/src/openvpn/s= sl.c
@@ -1990,6 +1990,9 @@
/* supp= ort for exit notify via control channel */
iv_prot= o |=3D IV_PROTO_CC_EXIT_NOTIFY;

+ /* support push-updates */
= + iv_proto |=3D IV_PROTO= _PUSH_UPDATE;
+
if (session->opt->pull)
= {
/* support for receiving push_reply before s= ending
diff --git a/src/openvpn/ssl.h b/src/openvpn/ssl.h
index c32cb6c..334b068 100644
--- a/src/open= vpn/ssl.h
+++ b/src/openvpn/ssl.h
@@ -114,6= +114,9 @@
/** Supports the --dns option after all the inc= ompatible changes */
#define IV_PROTO_DNS_OPTION_V2 (1&l= t;<11)

+/** Supports push-update */
+#define IV_PROTO_PUSH_UPDATE (1<<12)
+

/* Default fie= ld in X509 to be username */
#define X509_USERNAME_FIELD_D= EFAULT "CN"

diff --git a/tests/= unit_tests/openvpn/Makefile.am b/tests/unit_tests/openvpn/Makefile.am
index 471389b..6fb7843 100644
--- a/tests/unit_t= ests/openvpn/Makefile.am
+++ b/tests/unit_tests/openvpn/Mak= efile.am
@@ -11,7 +11,7 @@
endif
test_binaries +=3D crypto_testdriver packet_id_te= stdriver auth_token_testdriver ncp_testdriver misc_testdriver \
<= span style=3D"color: hsl(0, 100%, 40%);">- pkt_testdriver ssl_testdriver us= er_pass_testdriver

+ = pkt_testdriver ssl_testdriver user_pass_testdriver push_update_msg_testdriv= er

if HAVE_LD_WRAP_SUPPORT
if !WIN32

@@ -314,3 +314,21 @@
$(top_= srcdir)/src/openvpn/win32-util.c \
$(top_srcdir)/src/open= vpn/platform.c \
$(top_srcdir)/src/openvpn/list.c<= br>+
+push_update_msg_testdriver_CFLAGS =3D -I$(top_= srcdir)/src/openvpn \
+ -I$(top_srcdir)/src/compat \
+ -I$(top_srcdir)/tests/unit_tests/openvpn \
+ @TEST_CFLAGS@
+
+push_update_msg_testdriver_LDFLAGS =3D \
+ @TEST_LDFLAGS@ \
+ -L$(top_srcdir)/src/openvpn
+

+push_update_msg_testdriver_SOURCES =3D test_push_up= date_msg.c \
+ mock_m= sg.c \
+ mock_get_ran= dom.c \
+ $(top_srcdi= r)/src/openvpn/buffer.c \
+ $(top_srcdir)/src/openvpn/platform.c \
+ $(top_srcdir)/src/openvpn/push_util.c \+ $(top_srcdir)/src/openvpn/o= ptions_util.c \
+ $(t= op_srcdir)/src/openvpn/otime.c
\ No newline at end of file<= /span>
diff --git a/tests/unit_tests/openvpn/test_push_update_msg.= c b/tests/unit_tests/openvpn/test_push_update_msg.c
new fil= e mode 100644
index 0000000..d0876bc
--- /d= ev/null
+++ b/tests/unit_tests/openvpn/test_push_update_msg= .c
@@ -0,0 +1,245 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#inc= lude <stdlib.h>
+#include <stdarg.h>
+#include <setjmp.h>
+#include <cmocka.h>
+#include "push.h"
+#include "options_util.h"
<= span style=3D"color: hsl(120, 100%, 40%);">+

+/* mocks */
+
+un= signed int
+pull_perm= ission_mask(const struct context *c)
+{
+ = unsigned int flags =3D
+ OPT_P_UP
+ | OPT_P_SOCKBUF
+ | OPT_P_SOCKFLAGS
+ | OPT_P_SETENV
+ | OPT_P_SHAPER
+ | OPT_P_TIMER
+ | OPT_P_COMP
+ | OPT_P_PERSIST
+ | OPT_P_MESSAGES
+ | OPT_P_EXPLICIT_NOTIFY
+ | OPT_P_ECHO

+ | OPT_P_PULL_M= ODE
+ | OPT_P_= PEER_ID
+ | OP= T_P_NCP
+ | OP= T_P_PUSH_MTU
+ = | OPT_P_ROUTE
+ = | OPT_P_DHCPDNS;
+= return flags;
+}<= /span>
+
+bool
+apply_push_options(struct context *c,
+ struct options *o= ptions,
+ = struct buffer *buf,
+ unsigned int permission_mask,
+ unsigned int *option= _types_found,
+ = struct env_set *es,
+ bool is_update)
+{
+ char line[OPTION_PARM_SIZE];
+
+ while (buf_parse(buf, ',', line, sizeof(line)))
<= span style=3D"color: hsl(120, 100%, 40%);">+ {

+ unsigned int push_update_option_flags= =3D 0;
+
<= span style=3D"color: hsl(120, 100%, 40%);">+ if (!apply_pull_filter(= options, line, is_update, &push_update_option_flags))

+ {
+ msg(M_WARN, "Offending option = received from server");
+ return false;
+ }
+ /*
+ = * No need to test also the application part here
+ * (add_option/remove_option/upda= te_option)
+ = */
+ }
<= span style=3D"color: hsl(120, 100%, 40%);">+ return true;

+}

+
+int
+process_inco= ming_push_msg(struct context *c,
+ const struct buffer *buffer,<= br>+ b= ool honor_received_options,
+ unsigned int permission_mask,
<= span style=3D"color: hsl(120, 100%, 40%);">+ unsig= ned int *option_types_found)

+{
+ struc= t buffer buf =3D *buffer;
+
+ if (buf_s= tring_compare_advance(&buf, "PUSH_REQUEST"))
+ {
+ return PUSH_MSG_REQUEST;
+ }
+ else if (honor_received_options
+ && buf_string_= compare_advance(&buf, push_reply_cmd))

+ {
+ return PUSH_MSG_REPLY;
+ }
+ else if (honor_received_options
+ && buf_string_compare_advance(&a= mp;buf, push_update_cmd))
+ {
+ = return process_incoming_push_update(c, permission_mask,
+ = option_types_found, &buf);
+ }
+ else
+ {
+ return PUSH_MSG= _ERROR;
+ }=
+}
+
+/* tests */
+
+static void
+test_incoming_push_mess= age_basic(void **state)
+{
+ struct con= text *c =3D *state;
+= struct buffer buf =3D alloc_buf(256);
+ const char *update_msg =3D "PUSH_UPDATE,dhcp= -option DNS 8.8.8.8, route 0.0.0.0 0.0.0.0 10.10.10.1";
+ buf_write(&buf, update_msg= , strlen(update_msg));

+
+ assert_int_equal(process_incoming_push_msg(c, &buf, c->op= tions.pull, pull_permission_mask(c), &option_types_found), PUSH_MSG_UPD= ATE);
+
+ free_buf(&buf);
+}
+
+static void
= +test_incoming_push_message_error1(void **state)
+{
+ struct context *c =3D *state;
+ struct buffer buf =3D alloc_buf(256);+ const char *update_msg = =3D "PUSH_UPDATEerr,dhcp-option DNS 8.8.8.8";
+ buf_write(&buf, update_msg, str= len(update_msg));
+ = unsigned int option_types_found =3D 0;
+
+ assert_int_equal(process_incoming_push_msg(c, &buf, c->options= .pull, pull_permission_mask(c), &option_types_found), PUSH_MSG_ERROR);<= /span>
+
+ free_buf(&buf);
+}

+
+static void
+test_incoming_push_messa= ge_error2(void **state)
+{
+ struct con= text *c =3D *state;
+= struct buffer buf =3D alloc_buf(256);
+ const char *update_msg =3D "PUSH_UPDATE ,dhc= p-option DNS 8.8.8.8";
+ buf_write(&buf, update_msg, strlen(update_msg));
= + unsigned int option_types_= found =3D 0;
+=
+ assert_int_equal(proce= ss_incoming_push_msg(c, &buf, c->options.pull, pull_permission_mask(= c), &option_types_found), PUSH_MSG_ERROR);
+
+ free_buf(&buf);
+}
+
+static void
+test_incoming_push_message_1(void= **state)

+{+ struct context *c =3D *s= tate;
+ struct buf= fer buf =3D alloc_buf(256);
+ const char *update_msg =3D "PUSH_UPDATE, -?dns, route some= thing, ?dhcp-option DNS 8.8.8.8";
+ buf_write(&buf, update_msg, strlen(update_msg));=
+ unsigned int op= tion_types_found =3D 0;
+
+ assert_int_= equal(process_incoming_push_msg(c, &buf, c->options.pull, pull_permi= ssion_mask(c), &option_types_found), PUSH_MSG_UPDATE);
+
+ free_buf(&buf);
+}
+
+static void
+test_incoming_push_me= ssage_bad_format(void **state)
+{
+ str= uct context *c =3D *state;
+ struct buffer buf =3D alloc_buf(256);
+ const char *update_msg =3D "PUSH_UPDA= TE, -dhcp-option, ?-dns";
+ buf_write(&buf, update_msg, strlen(update_msg));<= br>+ unsigned int option_typ= es_found =3D 0;
+
+ assert_int_equal(pr= ocess_incoming_push_msg(c, &buf, c->options.pull, pull_permission_ma= sk(c), &option_types_found), PUSH_MSG_ERROR);
+
+ free_buf(&buf);
+}
+
+static void
= +test_incoming_push_message_not= _updatable_option(void **state)
+{
+ st= ruct context *c =3D *state;
+ struct buffer buf =3D alloc_buf(256);
+ const char *update_msg =3D "PUSH_UPD= ATE, dev tun";
+= buf_write(&buf, update_msg, strlen(update_msg));
+ unsigned int option_types_found = =3D 0;
+
+ assert_int_equal(process_inc= oming_push_msg(c, &buf, c->options.pull, pull_permission_mask(c), &a= mp;option_types_found), PUSH_MSG_ERROR);

+
+ free_buf(&buf);
+}
+
<= span style=3D"color: hsl(120, 100%, 40%);">+static void

+test_incoming_push_message_mix(void **s= tate)
+{
+ struct context *c =3D *state= ;

+ struct buffer = buf =3D alloc_buf(256);
+ const char *update_msg =3D "PUSH_UPDATE,-dhcp-option, route 10= .10.10.0, dhcp-option DNS 1.1.1.1, route 10.11.12.0, dhcp-option DOMAIN cor= p.local, keepalive 10 60";
+ buf_write(&buf, update_msg, strlen(update_msg));=
+ unsigned int option_ty= pes_found =3D 0;
+
+ assert_int_equal(p= rocess_incoming_push_msg(c, &buf, c->options.pull, pull_permission_m= ask(c), &option_types_found), PUSH_MSG_UPDATE);
+
+ free_buf(&buf);
+}
= +
+static void=
+test_incoming_push_message= _mix2(void **state)
+= {
+ struct context= *c =3D *state;
+ = struct buffer buf =3D alloc_buf(256);
+ const char *update_msg =3D "PUSH_UPDATE,-dhcp-op= tion,dhcp-option DNS 8.8.8.8,redirect-gateway local,route 192.168.1.0 255.2= 55.255.0";
+ = buf_write(&buf, update_msg, strlen(update_msg));
+ unsigned int option_types_found =3D 0= ;
+
+ assert_int_equal(process_incoming= _push_msg(c, &buf, c->options.pull, pull_permission_mask(c), &op= tion_types_found), PUSH_MSG_UPDATE);
+
+ = free_buf(&buf);
+}
+
+static int

+setup(void **state)
+{
+ struct context *c =3D calloc(1, sizeof(struct context));
+ c->options.pul= l =3D true;
+ c-&g= t;options.route_nopull =3D false;
+ *state =3D c;
+ return 0;
+}
+
<= span style=3D"color: hsl(120, 100%, 40%);">+static int

+teardown(void **state)
+{
+ struct context *c =3D *state;
+ free(c);
+ return 0;
+}
+int
+main(void)

+{
+ const struct CMUnitTest tests[] =3D {
+ cmocka_unit_test_setup_teardo= wn(test_incoming_push_message_basic, setup, teardown),
+ cmocka_unit_test_setup_teardown(= test_incoming_push_message_error1, setup, teardown),
+ cmocka_unit_test_setup_teardown(t= est_incoming_push_message_error2, setup, teardown),
+ cmocka_unit_test_setup_teardown(t= est_incoming_push_message_not_updatable_option, setup, teardown),+ cmocka_unit_test_setu= p_teardown(test_incoming_push_message_1, setup, teardown),
+ cmocka_unit_test_setup_teard= own(test_incoming_push_message_bad_format, setup, teardown),
+ cmocka_unit_test_setup_tea= rdown(test_incoming_push_message_mix, setup, teardown),

+ cmocka_unit_test_setup_teardown= (test_incoming_push_message_mix2, setup, teardown)
+ };
+
+ = return cmocka_run_group_tests(tests, NULL, NULL);
+}

To = view, visit change 808. To unsubscribe, or for help writing mail filters, visit = settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6ecd4cb47571cc8c20e46de8595= c742aeec6064a
Gerrit-Change-Number: 808
Gerrit-PatchSet: 12
Gerrit-Owner: mrbff <marco@...2726...> <= /div>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-Reviewer: stipa <lstipakov@...277...= >
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: stipa <lstipakov@...1663...= .>
Gerrit-Attention: mrbff <marco@...2726...&g= t;
Gerrit-MessageType: newpatchset
--cuFnYZCgxVI=--