From 90812e9879ba47ff0275f20efd653ae3381308b8 Mon Sep 17 00:00:00 2001 From: Selva Nair Date: Fri, 15 Sep 2017 14:46:15 -0400 Subject: [PATCH] Check whether in pull_mode before warning about previous connection blocks In particular, this eliminates the message that says "explicit-exit-notify is ignored by previous blocks" when the option is pushed. Note: pull_mode is identified as "allowed & OPT_P_PULL_MODE" matching with the definition in add_options(). Reported by: Eike Lohmann e.lohmann@ic3s.de https://www.mail-archive.com/openvpn-users@lists.sourceforge.net/msg04052.h tml v2: move the check to verify_permissions() as suggested by Gert Signed-off-by: Selva Nair Acked-by: Antonio Quartulli Message-Id: <1505501175-9016-1-git-send-email-selva.nair@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15452.html Signed-off-by: Gert Doering (cherry picked from commit 422ecdac4a2738cd269361e048468d8b58793c4e) --- src/openvpn/options.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 4a9c0e779..be25899ca 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -4845,11 +4845,13 @@ verify_permission(const char *name, #ifndef ENABLE_SMALL /* Check if this options is allowed in connection block, * but we are currently not in a connection block + * unless this is a pushed option. * Parsing a connection block uses a temporary options struct without * connection_list */ - if ((type & OPT_P_CONNECTION) && options->connection_list) + if ((type & OPT_P_CONNECTION) && options->connection_list + && !(allowed & OPT_P_PULL_MODE)) { if (file) { -- 2.47.2