netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Brian Davidson <davidson.brian@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: meta time rules display after 00:00 UTC
Date: Thu, 2 Nov 2023 11:26:19 +0100	[thread overview]
Message-ID: <20231102102619.GD6174@breakpoint.cc> (raw)
In-Reply-To: <CAOoaxdFXq6aJJMrFC40PRqd7ZTJDroRVh-BpH8Vz7H618V5GYQ@mail.gmail.com>

Brian Davidson <davidson.brian@gmail.com> wrote:
> 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.
> 
> nft add table ip t
> nft add chain ip t c
> nft add rule ip t c meta hour "19:00"-"19:59" counter
> nft add rule ip t c meta hour "20:00"-"20:59" counter
> nft list table ip t
> table ip t {
>         chain c {
>                 meta hour "19:00"-"19:59" counter packets 0 bytes 0
>                 meta hour "1193042:28:16"-"1193043:27:16" counter

Right, existing code is broken for negative offsets.

I'll post a fix later today.

      reply	other threads:[~2023-11-02 10:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31 18:53 meta time rules display after 00:00 UTC Brian Davidson
2023-11-02 10:26 ` Florian Westphal [this message]

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=20231102102619.GD6174@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=davidson.brian@gmail.com \
    --cc=netfilter@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 read-only IMAP folder(s) and NNTP newsgroup(s).