summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-03-30 13:25:10 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-03-30 13:29:08 +0200
commit5db9dc9292d30a3672b691e4a8a6cd49daa47b71 (patch)
tree7de2873260087f51c76943e6febb0efa34d388ed /src/rule.c
parent89e3001be44aa2f25e51b139f044328230cbb098 (diff)
src: store parser location for handle and position specifiers
Store the parser location structure for handle and position IDs so we can use this information from the evaluation step, to provide better error reporting. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rule.c b/src/rule.c
index 0ed77941..b7f4a07f 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -44,9 +44,9 @@ void handle_merge(struct handle *dst, const struct handle *src)
dst->chain = xstrdup(src->chain);
if (dst->set == NULL && src->set != NULL)
dst->set = xstrdup(src->set);
- if (dst->handle == 0)
+ if (dst->handle.id == 0)
dst->handle = src->handle;
- if (dst->position == 0)
+ if (dst->position.id == 0)
dst->position = src->position;
}
@@ -393,7 +393,7 @@ void rule_print(const struct rule *rule)
printf(" comment \"%s\"", rule->comment);
if (handle_output > 0)
- printf(" # handle %" PRIu64, rule->handle.handle);
+ printf(" # handle %" PRIu64, rule->handle.handle.id);
}
struct scope *scope_init(struct scope *scope, const struct scope *parent)