Skip to content

meta: introduce time/day/hour matching

Florian Westphal netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4evaluate: New internal helper __expr_evaluate_rangesrc/evaluate.c+16 -40 replies
2/4meta: Introduce new conditions 'time', 'day' and 'hour'doc/nft.txt doc/primary-expression.txt include/datatype.h +10 more+390 -40 replies
3/4tests: add meta time test casestests/py/any/meta.t tests/py/any/meta.t.json tests/py/any/meta.t.json.output +1 more+559 -04 replies
4/4src: evaluate: catch invalid 'meta day' values in eval stepsrc/evaluate.c tests/py/any/meta.t+17 -40 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchFlorian Westphal
1/4
2/4R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH nft 0/4] meta: introduce time/day/hour matching

Hi.

This series contains the changes that I plan to apply to nftables.git soon to get the 'time' matching feature in.

First patch is unchanged, second patch has the tests removed and replaces 'day' parsing with one that is based on the symbol table infra we already have. This means 'nft describe meta day' will now print all days plus their numeric value.

Third patch contains the test cases, I've moved them to 'any' because time matching isn't ip specific.

Last match adds a patch to catch invalid days during eval step.

Ander Juaristi (3):
evaluate: New internal helper __expr_evaluate_range
meta: Introduce new conditions 'time', 'day' and 'hour'
tests: add meta time test cases

Florian Westphal (1):
src: evaluate: catch invalid 'meta day' values in eval step

 doc/nft.txt                         |    6 
 doc/primary-expression.txt          |   27 +++
 include/datatype.h                  |    6 
 include/linux/netfilter/nf_tables.h |    6 
 include/meta.h                      |    3 
 include/nftables.h                  |    5 
 include/nftables/libnftables.h      |    1 
 src/datatype.c                      |    3 
 src/evaluate.c                      |   91 +++++++++++-
 src/main.c                          |   12 +
 src/meta.c                          |  261 ++++++++++++++++++++++++++++++++++++
 src/parser_bison.y                  |    9 +
 src/scanner.l                       |    1 
 tests/py/any/meta.t                 |   19 ++
 tests/py/any/meta.t.json            |  233 ++++++++++++++++++++++++++++++++
 tests/py/any/meta.t.json.output     |  234 ++++++++++++++++++++++++++++++++
 tests/py/any/meta.t.payload         |   77 ++++++++++
 17 files changed, 982 insertions(+), 12 deletions(-)