summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2023-08-30 17:05:59 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2023-08-31 16:38:14 +0200
commitea7ed1ae1389a352f8711a20861d391c9a8a3d3a (patch)
tree2dc7d4d86b353a89140d69513cab739f9c03d815 /src/rule.c
parent4e7b7dddebaf836097698574923178eff22a9836 (diff)
rule: set internal_location for table and chain
JSON parser does not seem to set on this, better provide a default location. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rule.c b/src/rule.c
index fa4c72ad..bce728ab 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -705,6 +705,7 @@ struct chain *chain_alloc(void)
struct chain *chain;
chain = xzalloc(sizeof(*chain));
+ chain->location = internal_location;
chain->refcnt = 1;
chain->handle.chain_id = ++chain_id;
init_list_head(&chain->rules);
@@ -1125,6 +1126,7 @@ struct table *table_alloc(void)
struct table *table;
table = xzalloc(sizeof(*table));
+ table->location = internal_location;
init_list_head(&table->chains);
init_list_head(&table->sets);
init_list_head(&table->objs);