summaryrefslogtreecommitdiff
path: root/usr.sbin/relayd/pfe.c
diff options
context:
space:
mode:
authorPierre-Yves Ritschard <pyr@cvs.openbsd.org>2007-09-27 07:32:51 +0000
committerPierre-Yves Ritschard <pyr@cvs.openbsd.org>2007-09-27 07:32:51 +0000
commit59d2aacb9bc9f1cc0b276bf3f21778249f570b7f (patch)
tree79ee01a574cea98724465e55cff1f7142e93a2c2 /usr.sbin/relayd/pfe.c
parent6bdcaced4036c413f3c0eca8afdf0d0337af05de (diff)
Do not clear the changed flag to early, which prevented a table
from being used by several services. ``looks fine'' reyk@
Diffstat (limited to 'usr.sbin/relayd/pfe.c')
-rw-r--r--usr.sbin/relayd/pfe.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/usr.sbin/relayd/pfe.c b/usr.sbin/relayd/pfe.c
index 4b5c29090ae..3419cbe20ce 100644
--- a/usr.sbin/relayd/pfe.c
+++ b/usr.sbin/relayd/pfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfe.c,v 1.34 2007/09/07 08:20:24 reyk Exp $ */
+/* $OpenBSD: pfe.c,v 1.35 2007/09/27 07:32:50 pyr Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org>
@@ -846,9 +846,6 @@ pfe_sync(void)
control_imsg_forward(&imsg);
}
- service->table->conf.flags &= ~(F_CHANGED);
- service->backup->conf.flags &= ~(F_CHANGED);
-
if (service->conf.flags & F_DOWN) {
if (service->conf.flags & F_ACTIVE_RULESET) {
flush_table(env, service);
@@ -874,6 +871,14 @@ pfe_sync(void)
}
TAILQ_FOREACH(table, env->tables, entry) {
+ /*
+ * clean up change flag.
+ */
+ table->conf.flags &= ~(F_CHANGED);
+
+ /*
+ * handle demotion.
+ */
if ((table->conf.flags & F_DEMOTE) == 0)
continue;
demote.level = 0;