aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorMasahide NAKAMURA <nakam@linux-ipv6.org>2006-09-22 18:06:24 -0400
committerDavid S. Miller <davem@davemloft.net>2006-09-22 18:06:24 -0400
commit5794708f11551b6d19b10673abf4b0202f66b44d (patch)
tree60d954e185dd80af7e6c08608fd0528cf21a5d41 /include/net/xfrm.h
parent7e49e6de30efa716614e280d97963c570f3acf29 (diff)
[XFRM]: Introduce a helper to compare id protocol.
Put the helper to header for future use. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 762795624b10..5b364b0a6a28 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -9,6 +9,7 @@
9#include <linux/skbuff.h> 9#include <linux/skbuff.h>
10#include <linux/socket.h> 10#include <linux/socket.h>
11#include <linux/pfkeyv2.h> 11#include <linux/pfkeyv2.h>
12#include <linux/ipsec.h>
12#include <linux/in6.h> 13#include <linux/in6.h>
13#include <linux/mutex.h> 14#include <linux/mutex.h>
14 15
@@ -835,6 +836,11 @@ static inline int xfrm_state_kern(struct xfrm_state *x)
835 return atomic_read(&x->tunnel_users); 836 return atomic_read(&x->tunnel_users);
836} 837}
837 838
839static inline int xfrm_id_proto_match(u8 proto, u8 userproto)
840{
841 return (userproto == IPSEC_PROTO_ANY || proto == userproto);
842}
843
838/* 844/*
839 * xfrm algorithm information 845 * xfrm algorithm information
840 */ 846 */