aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_mode_beet.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-03-29 21:16:22 +0100
committerSteffen Klassert <steffen.klassert@secunet.com>2019-04-08 09:13:46 +0200
commitb262a69582a4676c7378a73077b7bb186c7c5b2a (patch)
tree5c71243107e5f14023de503aeb2acd2214f01d25 /net/ipv4/xfrm4_mode_beet.c
parentvti4: eliminated some duplicate code. (diff)
downloadlinux-dev-b262a69582a4676c7378a73077b7bb186c7c5b2a.tar.xz
linux-dev-b262a69582a4676c7378a73077b7bb186c7c5b2a.zip
xfrm: place af number into xfrm_mode struct
This will be useful to know if we're supposed to decode ipv4 or ipv6. While at it, make the unregister function return void, all module_exit functions did just BUG(); there is never a point in doing error checks if there is no way to handle such error. Signed-off-by: Florian Westphal <fw@strlen.de> Reviewed-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv4/xfrm4_mode_beet.c')
-rw-r--r--net/ipv4/xfrm4_mode_beet.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c
index 856d2dfdb44b..a2e3b52ae46c 100644
--- a/net/ipv4/xfrm4_mode_beet.c
+++ b/net/ipv4/xfrm4_mode_beet.c
@@ -134,19 +134,17 @@ static struct xfrm_mode xfrm4_beet_mode = {
.owner = THIS_MODULE,
.encap = XFRM_MODE_BEET,
.flags = XFRM_MODE_FLAG_TUNNEL,
+ .family = AF_INET,
};
static int __init xfrm4_beet_init(void)
{
- return xfrm_register_mode(&xfrm4_beet_mode, AF_INET);
+ return xfrm_register_mode(&xfrm4_beet_mode);
}
static void __exit xfrm4_beet_exit(void)
{
- int err;
-
- err = xfrm_unregister_mode(&xfrm4_beet_mode, AF_INET);
- BUG_ON(err);
+ xfrm_unregister_mode(&xfrm4_beet_mode);
}
module_init(xfrm4_beet_init);