mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 07:35:10 +00:00
netfilter: nft_synproxy: unregister hooks on init error path
commit2b4e5fb4d3
upstream. Disable the IPv4 hooks if the IPv6 hooks fail to be registered. Fixes:ad49d86e07
("netfilter: nf_tables: Add synproxy support") Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5e8c5b217c
commit
73f8575216
1 changed files with 3 additions and 1 deletions
|
@ -191,8 +191,10 @@ static int nft_synproxy_do_init(const struct nft_ctx *ctx,
|
||||||
if (err)
|
if (err)
|
||||||
goto nf_ct_failure;
|
goto nf_ct_failure;
|
||||||
err = nf_synproxy_ipv6_init(snet, ctx->net);
|
err = nf_synproxy_ipv6_init(snet, ctx->net);
|
||||||
if (err)
|
if (err) {
|
||||||
|
nf_synproxy_ipv4_fini(snet, ctx->net);
|
||||||
goto nf_ct_failure;
|
goto nf_ct_failure;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue