netfilter: flowtable: Fix flushing of offloaded flows on free
authorPaul Blakey <paulb@mellanox.com>
Thu, 19 Mar 2020 09:52:25 +0000 (11:52 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 19 Mar 2020 20:05:30 +0000 (21:05 +0100)
commitc921ffe853332584eae4f5905cb2a14a7b3c9932
tree6939b433bbcecd8d5c0a85d20ae4a901b674dc68
parent41e9ec5a54f95eee1a57c8d26ab70e0492548c1b
netfilter: flowtable: Fix flushing of offloaded flows on free

Freeing a flowtable with offloaded flows, the flow are deleted from
hardware but are not deleted from the flow table, leaking them,
and leaving their offload bit on.

Add a second pass of the disabled gc to delete the these flows from
the flow table before freeing it.

Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support")
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_flow_table_core.c