diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-02-10 10:06:42 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-02-10 16:33:57 +0100 |
commit | 2b4e5fb4d3776c391e40fb33673ba946dd96012d (patch) | |
tree | d9bb3eacb371881e91fe032c724aaf3e4c00870a /net/netfilter | |
parent | 2e71ec1a725a794a16e3862791ed43fe5ba6a06b (diff) |
netfilter: nft_synproxy: unregister hooks on init error path
Disable the IPv4 hooks if the IPv6 hooks fail to be registered.
Fixes: ad49d86e07a4 ("netfilter: nf_tables: Add synproxy support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nft_synproxy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/netfilter/nft_synproxy.c b/net/netfilter/nft_synproxy.c index a0109fa1e92d..1133e06f3c40 100644 --- a/net/netfilter/nft_synproxy.c +++ b/net/netfilter/nft_synproxy.c @@ -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; } |