meta time rules display after 00:00 UTC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
packets 0 bytes 0
        }
}

# nft -d netlink -c add rule ip t c meta hour "20:00"-"20:59" counter
ip t c
  [ meta load hour => reg 1 ]
  [ byteorder reg 1 = hton(reg 1, 4, 4) ]
  [ cmp gte reg 1 0x00000000 ]
  [ cmp lte reg 1 0xd40d0000 ]
  [ counter pkts 0 bytes 0 ]

# date
Tue Oct 31 02:47:31 PM EDT 2023
# nft -v
nftables v1.0.6 (Lester Gooch #5)
# uname -a
Linux router 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1
(2023-09-29) x86_64 GNU/Linux



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux