Wrap basechain definition field around structure, add field later.
This is useful for error reporting.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
struct location location;
unsigned int refcnt;
uint32_t flags;
- struct prio_spec priority;
- struct hook_spec hook;
- struct expr *policy;
- const char *type;
- const char **dev_array;
- struct expr *dev_expr;
- int dev_array_len;
+ struct {
+ struct location loc;
+ struct prio_spec priority;
+ struct hook_spec hook;
+ struct expr *policy;
+ const char *type;
+ const char **dev_array;
+ struct expr *dev_expr;
+ int dev_array_len;
+ };
struct scope scope;
struct list_head rules;
};
$<chain>0->type = xstrdup(chain_type);
xfree($2);
+ $<chain>0->loc = @$;
$<chain>0->hook.loc = @4;
$<chain>0->hook.name = chain_hookname_lookup($4);
if ($<chain>0->hook.name == NULL) {