]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: xtables: add and use xt_request_find_table_lock
authorFlorian Westphal <fw@strlen.de>
Fri, 8 Dec 2017 16:01:53 +0000 (17:01 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 8 Jan 2018 17:01:12 +0000 (18:01 +0100)
commit79a0c6708df4aab9cb4a162452f6c4a383f49d0b
tree562f6c03438b662bdc985a4ddc8892a7bf892eaa
parent3160f34317dc03e8525dd90bac9525ed7904035d
netfilter: xtables: add and use xt_request_find_table_lock

currently we always return -ENOENT to userspace if we can't find
a particular table, or if the table initialization fails.

Followup patch will make nat table init fail in case nftables already
registered a nat hook so this change makes xt_find_table_lock return
an ERR_PTR to return the errno value reported from the table init
function.

Add xt_request_find_table_lock as try_then_request_module replacement
and use it where needed.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter/x_tables.h
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c
net/netfilter/x_tables.c