We currently delay restoring these options until we actually must
restore them. Since there is no reason to do so apart from the very
minor saving to not have to execute that code when a connection fails,
move them it into the general context_2 initialisation.
Patch V2: rebase on master.
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <
20210317160038.25828-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21676.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
}
}
+ if (c->options.pull)
+ {
+ pre_pull_restore(&c->options, &c->c2.gc);
+ }
+
/* map in current connection entry */
next_connection_entry(c);
struct event_timeout push_request_interval;
time_t push_request_timeout;
- bool did_pre_pull_restore;
/* hash of pulled options, so we can compare when options change */
bool pulled_options_digest_init_done;
md_ctx_init(c->c2.pulled_options_state, md_kt_get("SHA256"));
c->c2.pulled_options_digest_init_done = true;
}
- if (!c->c2.did_pre_pull_restore)
- {
- pre_pull_restore(&c->options, &c->c2.gc);
- c->c2.did_pre_pull_restore = true;
- }
if (apply_push_options(&c->options,
buf,
permission_mask,