Skip to content

Commit

Permalink
netfilter: conntrack: unregister ipv4 sockopts on error unwind
Browse files Browse the repository at this point in the history
[ Upstream commit 22cbdbc ]

When ipv6 sockopt register fails, the ipv4 one needs to be removed.

Fixes: a0ae256 ("netfilter: conntrack: remove l3proto abstraction")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Florian Westphal authored and gregkh committed Jun 10, 2021
1 parent 46e6506 commit 39a909a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nf_conntrack_proto.c
Expand Up @@ -660,7 +660,7 @@ int nf_conntrack_proto_init(void)

#if IS_ENABLED(CONFIG_IPV6)
cleanup_sockopt:
nf_unregister_sockopt(&so_getorigdst6);
nf_unregister_sockopt(&so_getorigdst);
#endif
return ret;
}
Expand Down

0 comments on commit 39a909a

Please sign in to comment.