diff options
author | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2008-05-06 09:52:48 +0000 |
---|---|---|
committer | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2008-05-06 09:52:48 +0000 |
commit | 29cd4d5870c6955ef22058920dbd89139602b9a0 (patch) | |
tree | d95d51e6623062f1190629802a6747735a3817d6 /usr.sbin/relayd | |
parent | 1359c0b6e98cffad6a64b8146e15ff8b8fc44fac (diff) |
do not attempt to reload a configuration if we come from a non pf
requiring configuration to a pf requiring one.
ok reyk@
Diffstat (limited to 'usr.sbin/relayd')
-rw-r--r-- | usr.sbin/relayd/relayd.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index 8e0c7095ac8..f5f78270b52 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.73 2008/02/13 11:32:59 reyk Exp $ */ +/* $OpenBSD: relayd.c,v 1.74 2008/05/06 09:52:47 pyr Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org> @@ -396,6 +396,15 @@ reconfigure(void) return; } + if (!(env->sc_flags & F_NEEDPF) && (new_env->sc_flags & F_NEEDPF)) { + log_warnx("new configuration requires pf while it " + "was previously disabled." + "configuration will not be reloaded"); + purge_config(new_env, PURGE_EVERYTHING); + free(new_env); + return; + } + purge_config(env, PURGE_EVERYTHING); merge_config(env, new_env); free(new_env); |