diff options
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r-- | include/net/xfrm.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index d74e080ba6c9..1913af67c43d 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/in6.h> | 12 | #include <linux/in6.h> |
13 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
14 | #include <linux/audit.h> | 14 | #include <linux/audit.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #include <net/sock.h> | 17 | #include <net/sock.h> |
17 | #include <net/dst.h> | 18 | #include <net/dst.h> |
@@ -19,6 +20,7 @@ | |||
19 | #include <net/route.h> | 20 | #include <net/route.h> |
20 | #include <net/ipv6.h> | 21 | #include <net/ipv6.h> |
21 | #include <net/ip6_fib.h> | 22 | #include <net/ip6_fib.h> |
23 | #include <net/flow.h> | ||
22 | 24 | ||
23 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
24 | 26 | ||
@@ -266,7 +268,6 @@ struct xfrm_policy_afinfo { | |||
266 | xfrm_address_t *saddr, | 268 | xfrm_address_t *saddr, |
267 | xfrm_address_t *daddr); | 269 | xfrm_address_t *daddr); |
268 | int (*get_saddr)(struct net *net, xfrm_address_t *saddr, xfrm_address_t *daddr); | 270 | int (*get_saddr)(struct net *net, xfrm_address_t *saddr, xfrm_address_t *daddr); |
269 | struct dst_entry *(*find_bundle)(struct flowi *fl, struct xfrm_policy *policy); | ||
270 | void (*decode_session)(struct sk_buff *skb, | 271 | void (*decode_session)(struct sk_buff *skb, |
271 | struct flowi *fl, | 272 | struct flowi *fl, |
272 | int reverse); | 273 | int reverse); |
@@ -481,13 +482,14 @@ struct xfrm_policy { | |||
481 | atomic_t refcnt; | 482 | atomic_t refcnt; |
482 | struct timer_list timer; | 483 | struct timer_list timer; |
483 | 484 | ||
485 | struct flow_cache_object flo; | ||
486 | atomic_t genid; | ||
484 | u32 priority; | 487 | u32 priority; |
485 | u32 index; | 488 | u32 index; |
486 | struct xfrm_mark mark; | 489 | struct xfrm_mark mark; |
487 | struct xfrm_selector selector; | 490 | struct xfrm_selector selector; |
488 | struct xfrm_lifetime_cfg lft; | 491 | struct xfrm_lifetime_cfg lft; |
489 | struct xfrm_lifetime_cur curlft; | 492 | struct xfrm_lifetime_cur curlft; |
490 | struct dst_entry *bundles; | ||
491 | struct xfrm_policy_walk_entry walk; | 493 | struct xfrm_policy_walk_entry walk; |
492 | u8 type; | 494 | u8 type; |
493 | u8 action; | 495 | u8 action; |
@@ -734,19 +736,12 @@ static inline void xfrm_pol_put(struct xfrm_policy *policy) | |||
734 | xfrm_policy_destroy(policy); | 736 | xfrm_policy_destroy(policy); |
735 | } | 737 | } |
736 | 738 | ||
737 | #ifdef CONFIG_XFRM_SUB_POLICY | ||
738 | static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols) | 739 | static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols) |
739 | { | 740 | { |
740 | int i; | 741 | int i; |
741 | for (i = npols - 1; i >= 0; --i) | 742 | for (i = npols - 1; i >= 0; --i) |
742 | xfrm_pol_put(pols[i]); | 743 | xfrm_pol_put(pols[i]); |
743 | } | 744 | } |
744 | #else | ||
745 | static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols) | ||
746 | { | ||
747 | xfrm_pol_put(pols[0]); | ||
748 | } | ||
749 | #endif | ||
750 | 745 | ||
751 | extern void __xfrm_state_destroy(struct xfrm_state *); | 746 | extern void __xfrm_state_destroy(struct xfrm_state *); |
752 | 747 | ||
@@ -877,11 +872,15 @@ struct xfrm_dst { | |||
877 | struct rt6_info rt6; | 872 | struct rt6_info rt6; |
878 | } u; | 873 | } u; |
879 | struct dst_entry *route; | 874 | struct dst_entry *route; |
875 | struct flow_cache_object flo; | ||
876 | struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX]; | ||
877 | int num_pols, num_xfrms; | ||
880 | #ifdef CONFIG_XFRM_SUB_POLICY | 878 | #ifdef CONFIG_XFRM_SUB_POLICY |
881 | struct flowi *origin; | 879 | struct flowi *origin; |
882 | struct xfrm_selector *partner; | 880 | struct xfrm_selector *partner; |
883 | #endif | 881 | #endif |
884 | u32 genid; | 882 | u32 xfrm_genid; |
883 | u32 policy_genid; | ||
885 | u32 route_mtu_cached; | 884 | u32 route_mtu_cached; |
886 | u32 child_mtu_cached; | 885 | u32 child_mtu_cached; |
887 | u32 route_cookie; | 886 | u32 route_cookie; |
@@ -891,6 +890,7 @@ struct xfrm_dst { | |||
891 | #ifdef CONFIG_XFRM | 890 | #ifdef CONFIG_XFRM |
892 | static inline void xfrm_dst_destroy(struct xfrm_dst *xdst) | 891 | static inline void xfrm_dst_destroy(struct xfrm_dst *xdst) |
893 | { | 892 | { |
893 | xfrm_pols_put(xdst->pols, xdst->num_pols); | ||
894 | dst_release(xdst->route); | 894 | dst_release(xdst->route); |
895 | if (likely(xdst->u.dst.xfrm)) | 895 | if (likely(xdst->u.dst.xfrm)) |
896 | xfrm_state_put(xdst->u.dst.xfrm); | 896 | xfrm_state_put(xdst->u.dst.xfrm); |