From: Ander Juaristi <a@juaristi.eus>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH v5 1/3] meta: Introduce new conditions 'time', 'day' and 'hour'
Date: Thu, 18 Jul 2019 14:56:34 +0200 [thread overview]
Message-ID: <0d7fec35-cf5b-1bdc-81de-99dd74e79621@juaristi.eus> (raw)
In-Reply-To: <20190714233401.frxc63fky53yfqft@breakpoint.cc>
On 15/7/19 1:34, Florian Westphal wrote:
>> Even when relying on kernel time zone for everything, I don't see
>> how we can support cross-day ("22:23-00:42") matching, as the range is
>> invalid.
>
> And that as well of course, swap and invert should work just fine.
>
>> Second problem:
>> Only solution I see is to change kernel patch to rely on
>> sys_tz, just like xt_time, with all the pain this brings.
>
> This stands, as the weekday is computed in the kernel, we will
> need to bring sys_tz into this on the kernel side, the current
> code uses UTC so we could be several hours off.
>
> This can be restricted to the 'DAY' case of course.
>
I see... Thank you. You saved me hours of work figuring this out.
So, for the TIME case we just swap left and right, and for the DAY case,
just add (tz_minuteswest * 60) to the seconds before breaking it into
day/mon/year?
And what does tz_dsttime do? gettimeofday(2) man says it is there for
historical reasons and should be ignored on Linux. But I don't know what
is it for in the kernel.
next prev parent reply other threads:[~2019-07-18 12:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-07 20:55 [PATCH v5 1/3] meta: Introduce new conditions 'time', 'day' and 'hour' Ander Juaristi
2019-07-07 20:55 ` [PATCH v5 2/3] tests/py: Add tests for " Ander Juaristi
2019-07-14 23:20 ` Florian Westphal
2019-07-07 20:55 ` [PATCH v5 3/3] nft: Update documentation Ander Juaristi
2019-07-14 23:19 ` [PATCH v5 1/3] meta: Introduce new conditions 'time', 'day' and 'hour' Florian Westphal
2019-07-14 23:34 ` Florian Westphal
2019-07-18 12:56 ` Ander Juaristi [this message]
2019-07-18 13:41 ` Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0d7fec35-cf5b-1bdc-81de-99dd74e79621@juaristi.eus \
--to=a@juaristi.eus \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).