summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/listing/dumps/meta_time.nodump
Commit message (Collapse)AuthorAgeFilesLines
* tests: meta_time: fix dump validation failureFlorian Westphal2024-04-021-0/+0
| | | | | | | | | | | | [DUMP FAIL] 1/1 tests/shell/testcases/listing/meta_time This dump file validates only correctly for TZ=UTC-1 (i.e., CET). Time dumps cannot be validated in a portable way, the dump depends on TZ. As the test already does dump valiation with different TZ values, remove the dump file again. Signed-off-by: Florian Westphal <fw@strlen.de>
* netlink_delinearize: reverse cross-day meta hour rangePablo Neira Ayuso2024-03-201-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | f8f32deda31d ("meta: Introduce new conditions 'time', 'day' and 'hour'") reverses the hour range in case that a cross-day range is used, eg. meta hour "03:00"-"14:00" counter accept which results in (Sidney, Australia AEDT time): meta hour != "14:00"-"03:00" counter accept kernel handles time in UTC, therefore, cross-day range may not be obvious according to local time. The ruleset listing above is not very intuitive to the reader depending on their timezone, therefore, complete netlink delinearize path to reverse the cross-day meta range. Update manpage to recommend to use a range expression when matching meta hour range. Recommend range expression for meta time and meta day too. Extend testcases/listing/meta_time to cover for this scenario. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1737 Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* meta: fix hour decoding when timezone offset is negativeFlorian Westphal2023-11-021-0/+0
Brian Davidson says: meta hour rules don't display properly after being created when the hour is on or after 00:00 UTC. The netlink debug looks correct for seconds past midnight UTC, but displaying the rules looks like an overflow or a byte order problem. I am in UTC-0400, so today, 20:00 and later exhibits the problem, while 19:00 and earlier hours are fine. meta.c only ever worked when the delta to UTC is positive. We need to add in case the second counter turns negative after offset adjustment. Also add a test case for this. Fixes: f8f32deda31d ("meta: Introduce new conditions 'time', 'day' and 'hour'") Reported-by: Brian Davidson <davidson.brian@gmail.com> Signed-off-by: Florian Westphal <fw@strlen.de>