Skip to content

Commit

Permalink
netfilter: conntrack: unregister ipv4 sockopts on error unwind
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Florian Westphal authored and ummakynes committed May 19, 2021
1 parent 04c26fa commit 22cbdbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nf_conntrack_proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,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 22cbdbc

Please sign in to comment.