msg = "ipv6 tunnel";
err = xfrm6_tunnel_register(&vti_ipv6_handler, AF_INET6);
if (err < 0)
- goto vti_tunnel_failed;
+ goto vti_tunnel_ipv6_failed;
+ err = xfrm6_tunnel_register(&vti_ipv6_handler, AF_INET);
+ if (err < 0)
+ goto vti_tunnel_ip6ip_failed;
#endif
msg = "netlink interface";
rtnl_link_failed:
#if IS_ENABLED(CONFIG_INET6_XFRM_TUNNEL)
+ err = xfrm6_tunnel_deregister(&vti_ipv6_handler, AF_INET);
+vti_tunnel_ip6ip_failed:
err = xfrm6_tunnel_deregister(&vti_ipv6_handler, AF_INET6);
-vti_tunnel_failed:
+vti_tunnel_ipv6_failed:
#endif
xfrm6_protocol_deregister(&vti_ipcomp6_protocol, IPPROTO_COMP);
xfrm_proto_comp_failed:
{
rtnl_link_unregister(&vti6_link_ops);
#if IS_ENABLED(CONFIG_INET6_XFRM_TUNNEL)
+ xfrm6_tunnel_deregister(&vti_ipv6_handler, AF_INET);
xfrm6_tunnel_deregister(&vti_ipv6_handler, AF_INET6);
#endif
xfrm6_protocol_deregister(&vti_ipcomp6_protocol, IPPROTO_COMP);