.err_handler = xfrmi6_err,
.priority = -1,
};
+
+static struct xfrm6_tunnel xfrmi_ip6ip_handler __read_mostly = {
+ .handler = xfrmi6_rcv_tunnel,
+ .cb_handler = xfrmi_rcv_cb,
+ .err_handler = xfrmi6_err,
+ .priority = -1,
+};
#endif
static struct xfrm4_protocol xfrmi_esp4_protocol __read_mostly = {
.err_handler = xfrmi4_err,
.priority = -1,
};
+
+static struct xfrm_tunnel xfrmi_ipip6_handler __read_mostly = {
+ .handler = xfrmi4_rcv_tunnel,
+ .cb_handler = xfrmi_rcv_cb,
+ .err_handler = xfrmi4_err,
+ .priority = -1,
+};
#endif
static int __init xfrmi4_init(void)
err = xfrm4_tunnel_register(&xfrmi_ipip_handler, AF_INET);
if (err < 0)
goto xfrm_tunnel_ipip_failed;
- err = xfrm4_tunnel_register(&xfrmi_ipip_handler, AF_INET6);
+ err = xfrm4_tunnel_register(&xfrmi_ipip6_handler, AF_INET6);
if (err < 0)
goto xfrm_tunnel_ipip6_failed;
#endif
static void xfrmi4_fini(void)
{
#if IS_ENABLED(CONFIG_INET_XFRM_TUNNEL)
- xfrm4_tunnel_deregister(&xfrmi_ipip_handler, AF_INET6);
+ xfrm4_tunnel_deregister(&xfrmi_ipip6_handler, AF_INET6);
xfrm4_tunnel_deregister(&xfrmi_ipip_handler, AF_INET);
#endif
xfrm4_protocol_deregister(&xfrmi_ipcomp4_protocol, IPPROTO_COMP);
err = xfrm6_tunnel_register(&xfrmi_ipv6_handler, AF_INET6);
if (err < 0)
goto xfrm_tunnel_ipv6_failed;
- err = xfrm6_tunnel_register(&xfrmi_ipv6_handler, AF_INET);
+ err = xfrm6_tunnel_register(&xfrmi_ip6ip_handler, AF_INET);
if (err < 0)
goto xfrm_tunnel_ip6ip_failed;
#endif
static void xfrmi6_fini(void)
{
#if IS_ENABLED(CONFIG_INET6_XFRM_TUNNEL)
- xfrm6_tunnel_deregister(&xfrmi_ipv6_handler, AF_INET);
+ xfrm6_tunnel_deregister(&xfrmi_ip6ip_handler, AF_INET);
xfrm6_tunnel_deregister(&xfrmi_ipv6_handler, AF_INET6);
#endif
xfrm6_protocol_deregister(&xfrmi_ipcomp6_protocol, IPPROTO_COMP);