]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: flowtable: Set offload timeout when adding flow
authorRoi Dayan <roid@mellanox.com>
Mon, 3 Aug 2020 07:33:05 +0000 (10:33 +0300)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 3 Aug 2020 10:37:24 +0000 (12:37 +0200)
commitc13e092e4b048525907b491f91fcfbd586f36bb6
tree1b281055be62ca298f4adf0b6921518c29fb32ef
parentb62bf5fdd88ba0705ead825a644376b3ebf58995
netfilter: flowtable: Set offload timeout when adding flow

On heavily loaded systems the GC can take time to go over all existing
conns and reset their timeout. At that time other calls like from
nf_conntrack_in() can call of nf_ct_is_expired() and see the conn as
expired. To fix this when we set the offload bit we should also reset
the timeout instead of counting on GC to finish first iteration over
all conns before the initial timeout.

Fixes: 22899617ab59 ("netfilter: nf_conntrack: add IPS_OFFLOAD status bit")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_flow_table_core.c