[PATCH nft 2/2] rule: set internal_location for table and chain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



JSON parser does not seem to set on this, better provide a default
location.

Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
 src/rule.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/rule.c b/src/rule.c
index fa4c72adab06..bce728ab9b46 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);
-- 
2.30.2




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux