summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2014-01-16 20:01:56 +0000
committerPatrick McHardy <kaber@trash.net>2014-01-16 20:01:56 +0000
commit11884cfb1c0432cc455ff8e3269500e819e0c434 (patch)
tree90678c8cf7a3193a1356069a238e7bd1428bb251 /src/scanner.l
parent21cfa9a7405f78f424c869e592d21ebdaf379803 (diff)
set: make set flags output parsable
This patch fixes two problems: - the output of "nft list table ..." is not parsable if sets are included because the parser can't parse the flags. - set flags can't be specified during set creation. To fix this, the set output is changed to: - not print each flag on a single line - prefix the flags with "flags " - only show the interval flag since all others are for internal use only The parser is changed to parse the flags specified in a set declaration. This allows to parse empty sets. The following patch will take care of parsing sets that are already populated. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 25fbc610..904d6fbc 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -256,6 +256,8 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr})
"position" { return POSITION; }
+"interval" { return INTERVAL; }
+
"counter" { return COUNTER; }
"packets" { return PACKETS; }
"bytes" { return BYTES; }