Skip to contentSkip to conversation

parser_bison: extend nft to delete table via table handle

PATCH Superseded Harsha Sharma 1 participant 1 message Jan 7, 2018 netfilter

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 parser_bison: extend nft to delete table via table handle

This patch allows deletion of table via unique table handles which can be listed with '-a' option.
For.eg.
nft delete table handle 4

---
Changes in v2:
-remove tableid_spec

 src/parser_bison.y | 4 ++++
 1 file changed, 4 insertions(+)
src/parser_bison.y +4 -0
index 6e85a62..6fdfac9 100644
@@ -978,6 +978,10 @@ delete_cmd		:	TABLE		table_spec
 			{
 				$$ = cmd_alloc(CMD_DELETE, CMD_OBJ_TABLE, &$2, &@$, NULL);
 			}
+			|	TABLE 		handle_spec
+			{
+				$$ = cmd_alloc(CMD_DELETE, CMD_OBJ_TABLE, &$2, &@$, NULL);
+			}
 			|	CHAIN		chain_spec
 			{
 				$$ = cmd_alloc(CMD_DELETE, CMD_OBJ_CHAIN, &$2, &@$, NULL);
Signature · 1 line
2.11.0