]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: unbind callbacks from flowtable destroy path
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 3 Jan 2020 13:36:07 +0000 (14:36 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 5 Jan 2020 09:06:49 +0000 (10:06 +0100)
commit480925609859680cd1dcc7383cff9ed624e8dd3a
tree3b0fa28da51d35bf2e8f915f47807c22aa6bd243
parent2ad0834496a8df6777b744862a0ccf44a6c2a573
netfilter: nf_tables: unbind callbacks from flowtable destroy path

Callback unbinding needs to be done after nf_flow_table_free(),
otherwise entries are not removed from the hardware.

Update nft_unregister_flowtable_net_hooks() to call
nf_unregister_net_hook() instead since the commit/abort paths do not
deal with the callback unbinding anymore.

Add a comment to nft_flowtable_event() to clarify that
flow_offload_netdev_event() already removes the entries before the
callback unbinding.

Fixes: 95761362366c ("netfilter: nf_tables: add flowtable offload control plane")
Fixes c220740bd366 ("netfilter: nf_tables: add nft_unregister_flowtable_hook()")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: wenxu <wenxu@ucloud.cn>
net/netfilter/nf_tables_api.c