summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-10-12 18:14:52 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-10-12 18:14:52 +0000
commit8c6e2facbc71f7315f683084309517df13be135a (patch)
tree1ae6aa6919283fa77c87f219993e3ff5a1c5797f /usr.sbin
parent3340aa359b7f1a5408b241506d923a8819934dce (diff)
fix a bug where matching a "for all" rule with multiple condition will not
let us know which condition we matched.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/ruleset.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/ruleset.c b/usr.sbin/smtpd/ruleset.c
index 54cf904ecdb..9162de7a7fc 100644
--- a/usr.sbin/smtpd/ruleset.c
+++ b/usr.sbin/smtpd/ruleset.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ruleset.c,v 1.3 2009/10/11 17:40:49 gilles Exp $ */
+/* $OpenBSD: ruleset.c,v 1.4 2009/10/12 18:14:51 gilles Exp $ */
/*
* Copyright (c) 2009 Gilles Chehade <gilles@openbsd.org>
@@ -56,8 +56,10 @@ ruleset_match(struct smtpd *env, struct path *path, struct sockaddr_storage *ss)
continue;
TAILQ_FOREACH(cond, &r->r_conditions, c_entry) {
- if (cond->c_type == C_ALL)
+ if (cond->c_type == C_ALL) {
+ path->cond = cond;
return r;
+ }
if (cond->c_type == C_DOM) {
cond->c_match = map_find(env, cond->c_map);