mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-02 17:26:42 +09:00
netfilter: nft_synproxy: unregister hooks on init error path
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>
This commit is contained in:
@@ -191,8 +191,10 @@ static int nft_synproxy_do_init(const struct nft_ctx *ctx,
|
||||
if (err)
|
||||
goto nf_ct_failure;
|
||||
err = nf_synproxy_ipv6_init(snet, ctx->net);
|
||||
if (err)
|
||||
if (err) {
|
||||
nf_synproxy_ipv4_fini(snet, ctx->net);
|
||||
goto nf_ct_failure;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user