diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2006-04-01 03:54:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-04-01 03:54:16 -0500 |
commit | dbe5b4aaafc715b12dbbea309d3d17958d01fd65 (patch) | |
tree | 936518ad9d5452f5efe18e0107255eab0aafb58d /net/xfrm | |
parent | e695633e21ffb6a443a8c2f8b3f095c7f1a48eb0 (diff) |
[IPSEC]: Kill unused decap state structure
This patch removes the *_decap_state structures which were previously
used to share state between input/post_input. This is no longer
needed.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_input.c | 4 | ||||
-rw-r--r-- | net/xfrm/xfrm_policy.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 2407a7072327..b54971059f16 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c | |||
@@ -18,7 +18,7 @@ void __secpath_destroy(struct sec_path *sp) | |||
18 | { | 18 | { |
19 | int i; | 19 | int i; |
20 | for (i = 0; i < sp->len; i++) | 20 | for (i = 0; i < sp->len; i++) |
21 | xfrm_state_put(sp->x[i].xvec); | 21 | xfrm_state_put(sp->xvec[i]); |
22 | kmem_cache_free(secpath_cachep, sp); | 22 | kmem_cache_free(secpath_cachep, sp); |
23 | } | 23 | } |
24 | EXPORT_SYMBOL(__secpath_destroy); | 24 | EXPORT_SYMBOL(__secpath_destroy); |
@@ -37,7 +37,7 @@ struct sec_path *secpath_dup(struct sec_path *src) | |||
37 | 37 | ||
38 | memcpy(sp, src, sizeof(*sp)); | 38 | memcpy(sp, src, sizeof(*sp)); |
39 | for (i = 0; i < sp->len; i++) | 39 | for (i = 0; i < sp->len; i++) |
40 | xfrm_state_hold(sp->x[i].xvec); | 40 | xfrm_state_hold(sp->xvec[i]); |
41 | } | 41 | } |
42 | atomic_set(&sp->refcnt, 1); | 42 | atomic_set(&sp->refcnt, 1); |
43 | return sp; | 43 | return sp; |
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index f5eae9febd26..c3725fe2a8fb 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -943,9 +943,9 @@ xfrm_policy_ok(struct xfrm_tmpl *tmpl, struct sec_path *sp, int start, | |||
943 | } else | 943 | } else |
944 | start = -1; | 944 | start = -1; |
945 | for (; idx < sp->len; idx++) { | 945 | for (; idx < sp->len; idx++) { |
946 | if (xfrm_state_ok(tmpl, sp->x[idx].xvec, family)) | 946 | if (xfrm_state_ok(tmpl, sp->xvec[idx], family)) |
947 | return ++idx; | 947 | return ++idx; |
948 | if (sp->x[idx].xvec->props.mode) | 948 | if (sp->xvec[idx]->props.mode) |
949 | break; | 949 | break; |
950 | } | 950 | } |
951 | return start; | 951 | return start; |
@@ -968,7 +968,7 @@ EXPORT_SYMBOL(xfrm_decode_session); | |||
968 | static inline int secpath_has_tunnel(struct sec_path *sp, int k) | 968 | static inline int secpath_has_tunnel(struct sec_path *sp, int k) |
969 | { | 969 | { |
970 | for (; k < sp->len; k++) { | 970 | for (; k < sp->len; k++) { |
971 | if (sp->x[k].xvec->props.mode) | 971 | if (sp->xvec[k]->props.mode) |
972 | return 1; | 972 | return 1; |
973 | } | 973 | } |
974 | 974 | ||
@@ -994,8 +994,8 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, | |||
994 | int i; | 994 | int i; |
995 | 995 | ||
996 | for (i=skb->sp->len-1; i>=0; i--) { | 996 | for (i=skb->sp->len-1; i>=0; i--) { |
997 | struct sec_decap_state *xvec = &(skb->sp->x[i]); | 997 | struct xfrm_state *x = skb->sp->xvec[i]; |
998 | if (!xfrm_selector_match(&xvec->xvec->sel, &fl, family)) | 998 | if (!xfrm_selector_match(&x->sel, &fl, family)) |
999 | return 0; | 999 | return 0; |
1000 | } | 1000 | } |
1001 | } | 1001 | } |