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(-) -- 2.49.0