aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/netfilter/nf_tables_ipv6.c
diff options
context:
space:
mode:
authorGao Feng <fgao@ikuai8.com>2016-09-10 10:04:30 +0800
committerPablo Neira Ayuso <pablo@netfilter.org>2016-09-12 19:54:45 +0200
commit23d07508d25cea9984ee068538b4e86932b015c2 (patch)
tree833a38e0a77fe244b9a5ca0f41c571f97d411db2 /net/ipv6/netfilter/nf_tables_ipv6.c
parentnetfilter: Add the missed return value check of register_netdevice_notifier (diff)
downloadlinux-dev-23d07508d25cea9984ee068538b4e86932b015c2.tar.xz
linux-dev-23d07508d25cea9984ee068538b4e86932b015c2.zip
netfilter: Add the missed return value check of nft_register_chain_type
There are some codes of netfilter module which did not check the return value of nft_register_chain_type. Add the checks now. Signed-off-by: Gao Feng <fgao@ikuai8.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6/netfilter/nf_tables_ipv6.c')
-rw-r--r--net/ipv6/netfilter/nf_tables_ipv6.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/netfilter/nf_tables_ipv6.c b/net/ipv6/netfilter/nf_tables_ipv6.c
index 05d05926962a..d6e4ba5de916 100644
--- a/net/ipv6/netfilter/nf_tables_ipv6.c
+++ b/net/ipv6/netfilter/nf_tables_ipv6.c
@@ -100,7 +100,10 @@ static int __init nf_tables_ipv6_init(void)
{
int ret;
- nft_register_chain_type(&filter_ipv6);
+ ret = nft_register_chain_type(&filter_ipv6);
+ if (ret < 0)
+ return ret;
+
ret = register_pernet_subsys(&nf_tables_ipv6_net_ops);
if (ret < 0)
nft_unregister_chain_type(&filter_ipv6);