Skip to content

Commit 2b4e5fb

Browse files
committed
netfilter: nft_synproxy: unregister hooks on init error path
Disable the IPv4 hooks if the IPv6 hooks fail to be registered. Fixes: ad49d86 ("netfilter: nf_tables: Add synproxy support") Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 2e71ec1 commit 2b4e5fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

net/netfilter/nft_synproxy.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,10 @@ static int nft_synproxy_do_init(const struct nft_ctx *ctx,
191191
if (err)
192192
goto nf_ct_failure;
193193
err = nf_synproxy_ipv6_init(snet, ctx->net);
194-
if (err)
194+
if (err) {
195+
nf_synproxy_ipv4_fini(snet, ctx->net);
195196
goto nf_ct_failure;
197+
}
196198
break;
197199
}
198200

0 commit comments

Comments
 (0)