summaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_mode_tunnel.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/xfrm4_mode_tunnel.c')
-rw-r--r--net/ipv4/xfrm4_mode_tunnel.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/xfrm4_mode_tunnel.c b/net/ipv4/xfrm4_mode_tunnel.c
index 2a9764bd1719..cfc6b6d39755 100644
--- a/net/ipv4/xfrm4_mode_tunnel.c
+++ b/net/ipv4/xfrm4_mode_tunnel.c
@@ -131,19 +131,17 @@ static struct xfrm_mode xfrm4_tunnel_mode = {
.owner = THIS_MODULE,
.encap = XFRM_MODE_TUNNEL,
.flags = XFRM_MODE_FLAG_TUNNEL,
+ .family = AF_INET,
};
static int __init xfrm4_mode_tunnel_init(void)
{
- return xfrm_register_mode(&xfrm4_tunnel_mode, AF_INET);
+ return xfrm_register_mode(&xfrm4_tunnel_mode);
}
static void __exit xfrm4_mode_tunnel_exit(void)
{
- int err;
-
- err = xfrm_unregister_mode(&xfrm4_tunnel_mode, AF_INET);
- BUG_ON(err);
+ xfrm_unregister_mode(&xfrm4_tunnel_mode);
}
module_init(xfrm4_mode_tunnel_init);