From ea7ed1ae1389a352f8711a20861d391c9a8a3d3a Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 30 Aug 2023 17:05:59 +0200 Subject: 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 --- src/rule.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v1.2.3