#undef PROCESS_SIGNAL_P2P
+void init_early(struct context *c)
+{
+ net_ctx_init(c, &c->net_ctx);
+
+ /* init verbosity and mute levels */
+ init_verb_mute(c, IVM_LEVEL_1);
+
+}
+
+static void uninit_early(struct context *c)
+{
+ net_ctx_free(&c->net_ctx);
+}
+
/**************************************************************************/
/**
open_plugins(&c, true, OPENVPN_PLUGIN_INIT_PRE_CONFIG_PARSE);
#endif
- net_ctx_init(&c, &c.net_ctx);
-
- /* init verbosity and mute levels */
- init_verb_mute(&c, IVM_LEVEL_1);
+ /* Early initialisation that need to happen before option
+ * post processing and other early startup but after parsing */
+ init_early(&c);
/* set dev options */
init_options_dev(&c.options);
env_set_destroy(c.es);
uninit_options(&c.options);
gc_reset(&c.gc);
- net_ctx_free(&c.net_ctx);
+ uninit_early(&c);
}
while (c.sig->signal_received == SIGHUP);
}