summaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-11-08 22:32:47 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2019-11-15 23:44:45 +0100
commit6408c40c39d8eee5caaf97f5219b7dd4e041cc59 (patch)
treecb5889d1313976059fd0d4e8dac6c93d7ca84f78 /net/ipv4
parentfcbad8293d52864d87d0b9f6035fd87a049d59d8 (diff)
netfilter: nft_meta: use 64-bit time arithmetic
On 32-bit architectures, get_seconds() returns an unsigned 32-bit time value, which also matches the type used in the nft_meta code. This will not overflow in year 2038 as a time_t would, but it still suffers from the overflow problem later on in year 2106. Change this instance to use the time64_t type consistently and avoid the deprecated get_seconds(). The nft_meta_weekday() calculation potentially gets a little slower on 32-bit architectures, but now it has the same behavior as on 64-bit architectures and does not overflow. Fixes: 63d10e12b00d ("netfilter: nft_meta: support for time matching") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv4')
0 files changed, 0 insertions, 0 deletions