summaryrefslogtreecommitdiff
path: root/include/net/xfrm.h
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 /include/net/xfrm.h
parentf981c57ffd2d7cf2dd4b6d6f8fcb3965df42f54c (diff)
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 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 85386becbaea..9a155063c25f 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -482,8 +482,9 @@ struct xfrm_mode {
struct xfrm_state_afinfo *afinfo;
struct module *owner;
- unsigned int encap;
- int flags;
+ u8 encap;
+ u8 family;
+ u8 flags;
};
/* Flags for xfrm_mode. */
@@ -491,8 +492,8 @@ enum {
XFRM_MODE_FLAG_TUNNEL = 1,
};
-int xfrm_register_mode(struct xfrm_mode *mode, int family);
-int xfrm_unregister_mode(struct xfrm_mode *mode, int family);
+int xfrm_register_mode(struct xfrm_mode *mode);
+void xfrm_unregister_mode(struct xfrm_mode *mode);
static inline int xfrm_af2proto(unsigned int family)
{