From 59d2aacb9bc9f1cc0b276bf3f21778249f570b7f Mon Sep 17 00:00:00 2001 From: Pierre-Yves Ritschard Date: Thu, 27 Sep 2007 07:32:51 +0000 Subject: Do not clear the changed flag to early, which prevented a table from being used by several services. ``looks fine'' reyk@ --- usr.sbin/relayd/pfe.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'usr.sbin/relayd/pfe.c') 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 @@ -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; -- cgit v1.2.3