aboutsummaryrefslogtreecommitdiffstats
path: root/smtpd
diff options
context:
space:
mode:
authorgilles <gilles@poolp.org>2016-11-25 11:03:33 +0100
committergilles <gilles@poolp.org>2016-11-25 11:03:33 +0100
commitdc35bbac73f2869e4f499b72e4a4fe3285aef70d (patch)
tree475600c8402740dcc164ed7c2e0b80ee9efb03dd /smtpd
parentsync with OpenBSd (diff)
downloadOpenSMTPD-dc35bbac73f2869e4f499b72e4a4fe3285aef70d.tar.xz
OpenSMTPD-dc35bbac73f2869e4f499b72e4a4fe3285aef70d.zip
sync with openbsd
Diffstat (limited to 'smtpd')
-rw-r--r--smtpd/parse.y5
-rw-r--r--smtpd/smtpd.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/smtpd/parse.y b/smtpd/parse.y
index 3a73371c..0bc65098 100644
--- a/smtpd/parse.y
+++ b/smtpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.190 2016/09/12 07:33:00 eric Exp $ */
+/* $OpenBSD: parse.y,v 1.191 2016/11/25 09:21:21 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -93,6 +93,7 @@ char *symget(const char *);
struct smtpd *conf = NULL;
static int errors = 0;
+static uint64_t ruleid = 0;
struct filter_conf *filter = NULL;
struct table *table = NULL;
@@ -1409,6 +1410,7 @@ accept_params : opt_accept accept_params
rule : ACCEPT {
rule = xcalloc(1, sizeof(*rule), "parse rule: ACCEPT");
+ rule->r_id = ++ruleid;
rule->r_action = A_NONE;
rule->r_decision = R_ACCEPT;
rule->r_desttype = DEST_DOM;
@@ -1441,6 +1443,7 @@ rule : ACCEPT {
}
| REJECT {
rule = xcalloc(1, sizeof(*rule), "parse rule: REJECT");
+ rule->r_id = ++ruleid;
rule->r_decision = R_REJECT;
rule->r_desttype = DEST_DOM;
} decision {
diff --git a/smtpd/smtpd.h b/smtpd/smtpd.h
index ed308198..46819c5e 100644
--- a/smtpd/smtpd.h
+++ b/smtpd/smtpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.h,v 1.524 2016/11/17 17:34:55 eric Exp $ */
+/* $OpenBSD: smtpd.h,v 1.525 2016/11/25 09:21:21 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -376,6 +376,7 @@ enum decision {
};
struct rule {
+ uint64_t r_id;
TAILQ_ENTRY(rule) r_entry;
enum decision r_decision;
uint8_t r_nottag;