This changes the behavior for pf plugins: instead of just not initializing
the firewall rules and happily continuing, this now rejects the client in
the case of an (unlikely) failure to initialize the pf.
Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <
20171101220342.14648-3-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15704.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
}
#endif
}
- else
- {
- msg(M_WARN, "WARNING: OPENVPN_PLUGIN_ENABLE_PF disabled");
- }
+ }
+ if (!c->c2.pf.enabled)
+ {
+ msg(M_WARN, "WARNING: failed to init PF plugin, rejecting client.");
+ register_signal(c, SIGUSR1, "plugin-pf-init-failed");
+ return;
}
}
#endif /* ifdef PLUGIN_PF */