Skip to contentSkip to conversation

parser_bison: Allow flushing flow tables

PATCH Applied Elise Lennion 2 participants 2 messages Mar 17, 2017 – Mar 20, 2017 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 parser_bison: Allow flushing flow tables

This patch enables the command flush on flow tables, which removes all entries in it:

$ nft flush flow table filter ft-https

Command above flushes flow table 'ft-https' in table 'filter'.

---
 src/parser_bison.y | 4 ++++
 1 file changed, 4 insertions(+)
src/parser_bison.y +4 -0
index 5d3d106..e44ff44 100644
@@ -1127,6 +1127,10 @@ flush_cmd		:	TABLE		table_spec
 			{
 				$$ = cmd_alloc(CMD_FLUSH, CMD_OBJ_SET, &$2, &@$, NULL);
 			}
+			|	FLOW TABLE	set_spec
+			{
+				$$ = cmd_alloc(CMD_FLUSH, CMD_OBJ_SET, &$3, &@$, NULL);
+			}
 			|	RULESET		ruleset_spec
 			{
 				$$ = cmd_alloc(CMD_FLUSH, CMD_OBJ_RULESET, &$2, &@$, NULL);
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw
Quoted 6 lines · Elise Lennion

This patch enables the command flush on flow tables, which removes all entries in it:

$ nft flush flow table filter ft-https

Command above flushes flow table 'ft-https' in table 'filter'.

Applied, thanks Elise.