]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: remove nft_ctx_init_from_elemattr()
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 30 May 2021 22:08:10 +0000 (00:08 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 7 Jun 2021 10:23:36 +0000 (12:23 +0200)
commit5b8e5a8f80e5b2e699e4a7a84df098f3188e2516
treea58f0436168f058418e63f222be257cb2bee5cd9
parent6bd075478aefb1c4fef866fa63e76c26c770c023
netfilter: nf_tables: remove nft_ctx_init_from_elemattr()

Replace nft_ctx_init_from_elemattr() by nft_table_lookup() and set up
the context structure right before it is really needed.

Moreover, nft_ctx_init_from_elemattr() is setting up the context
structure for codepaths where this is not really needed at all.

This helper function is also not helping to consolidate code, removing
it saves us 4 LoC.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c