aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 248874ecf8df..7f1630630dcf 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -869,6 +869,23 @@ xfrm_state_addr_check(struct xfrm_state *x,
869 return 0; 869 return 0;
870} 870}
871 871
872static __inline__ int
873xfrm_state_addr_flow_check(struct xfrm_state *x, struct flowi *fl,
874 unsigned short family)
875{
876 switch (family) {
877 case AF_INET:
878 return __xfrm4_state_addr_check(x,
879 (xfrm_address_t *)&fl->fl4_dst,
880 (xfrm_address_t *)&fl->fl4_src);
881 case AF_INET6:
882 return __xfrm6_state_addr_check(x,
883 (xfrm_address_t *)&fl->fl6_dst,
884 (xfrm_address_t *)&fl->fl6_src);
885 }
886 return 0;
887}
888
872static inline int xfrm_state_kern(struct xfrm_state *x) 889static inline int xfrm_state_kern(struct xfrm_state *x)
873{ 890{
874 return atomic_read(&x->tunnel_users); 891 return atomic_read(&x->tunnel_users);
@@ -1014,7 +1031,7 @@ extern void xfrm_policy_flush(void);
1014extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); 1031extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol);
1015extern int xfrm_flush_bundles(void); 1032extern int xfrm_flush_bundles(void);
1016extern void xfrm_flush_all_bundles(void); 1033extern void xfrm_flush_all_bundles(void);
1017extern int xfrm_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl, int family); 1034extern int xfrm_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl, int family, int strict);
1018extern void xfrm_init_pmtu(struct dst_entry *dst); 1035extern void xfrm_init_pmtu(struct dst_entry *dst);
1019 1036
1020extern wait_queue_head_t km_waitq; 1037extern wait_queue_head_t km_waitq;