evaluate: Fix for 'meta hour' ranges spanning date boundaries
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest3 patches 2 repliesIn review
- v23 patches 3 repliesSuperseded
- v11 patch 2 repliesSuperseded
Changes in v3 from the cover letter
- Must continue handling for EXPR_RANGE type, it is still in use
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | expression: Introduce is_symbol_value_expr() macroinclude/ src/ | +4 | 0 replies | |
| 2/3 | parser_json: Parse into symbol range expression if possiblesrc/ | +11 | 0 replies | |
| 3/3 | evaluate: Fix for 'meta hour' ranges spanning date boundariesdoc/ src/ tests/ +4 more | +312 | 0 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Pablo Neira Ayuso |
|---|---|
| Series | R-b |
| 1/3 | |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [nft PATCH v3 0/3] evaluate: Fix for 'meta hour' ranges spanning date boundaries
Kernel's timezone is UTC, so 'meta hour' returns seconds since UTC start of day. To mach against this, user space has to convert the RHS value given in local timezone into UTC. With ranges (e.g. 9:00-17:00), depending on the local timezone, these may span midnight in UTC (e.g. 23:00-7:00) and thus need to be converted into a proper range again (e.g. 7:00-23:00, inverted). Since nftables commit 347039f64509e ("src:
add symbol range expression to further compact intervals"), this conversion was broken.
Changes since v2:
- Must continue handling for EXPR_RANGE type, it is still in use
Changes since v1:
- Apply the parser changes of commit 347039f64509e to JSON parser as well (new patches 1 and 2)
- Misc fixes in patch 3
Phil Sutter (3):
expression: Introduce is_symbol_value_expr() macro
parser_json: Parse into symbol range expression if possible
evaluate: Fix for 'meta hour' ranges spanning date boundaries
doc/primary-expression.txt | 3 +- include/expression.h | 2 + src/evaluate.c | 25 +++- src/parser_bison.y | 6 +- src/parser_json.c | 12 +- tests/py/any/meta.t | 9 ++ tests/py/any/meta.t.json | 182 ++++++++++++++++++++++++ tests/py/any/meta.t.json.output | 18 +++ tests/py/any/meta.t.payload | 51 +++++++ tests/shell/testcases/listing/meta_time | 30 ++++ 10 files changed, 327 insertions(+), 11 deletions(-)
Signature · 1 line
2.49.0