From 5db9dc9292d30a3672b691e4a8a6cd49daa47b71 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 30 Mar 2016 13:25:10 +0200 Subject: 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 Acked-by: Arturo Borrero Gonzalez --- src/netlink_delinearize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/netlink_delinearize.c') diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c index d431588f..848acd66 100644 --- a/src/netlink_delinearize.c +++ b/src/netlink_delinearize.c @@ -1759,10 +1759,10 @@ struct rule *netlink_delinearize_rule(struct netlink_ctx *ctx, h.family = nftnl_rule_get_u32(nlr, NFTNL_RULE_FAMILY); h.table = xstrdup(nftnl_rule_get_str(nlr, NFTNL_RULE_TABLE)); h.chain = xstrdup(nftnl_rule_get_str(nlr, NFTNL_RULE_CHAIN)); - h.handle = nftnl_rule_get_u64(nlr, NFTNL_RULE_HANDLE); + h.handle.id = nftnl_rule_get_u64(nlr, NFTNL_RULE_HANDLE); if (nftnl_rule_is_set(nlr, NFTNL_RULE_POSITION)) - h.position = nftnl_rule_get_u64(nlr, NFTNL_RULE_POSITION); + h.position.id = nftnl_rule_get_u64(nlr, NFTNL_RULE_POSITION); pctx->rule = rule_alloc(&netlink_location, &h); pctx->table = table_lookup(&h); -- cgit v1.2.3