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