netfilter: conntrack: unregister ipv4 sockopts on error unwind
Subsystems (2)
Florian Westphal
maintainerPATCH 1/1 netfilter: conntrack: unregister ipv4 sockopts on error unwind
When ipv6 sockopt register fails, the ipv4 one needs to be removed.
Fixes a0ae2562c6c ("netfilter: conntrack: remove l3proto abstraction")
Signed-off-by Florian Westphal <[email protected]>
---
The should be no confict/overlap with an existing sockopt range, so I don't think the registration can fail in the first place.
However, its broken as-is.
An alternate solution (in -next), might be to change return type to void and have nf_register_sockopt WARN() instead.
net/netfilter/nf_conntrack_proto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_conntrack_proto.c +1 -1
@@ -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; }
Signature · 1 line
2.26.3