[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>
This commit is contained in:
committed by
David S. Miller
parent
e695633e21
commit
dbe5b4aaaf
@@ -18,7 +18,7 @@ void __secpath_destroy(struct sec_path *sp)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < sp->len; i++)
|
||||
xfrm_state_put(sp->x[i].xvec);
|
||||
xfrm_state_put(sp->xvec[i]);
|
||||
kmem_cache_free(secpath_cachep, sp);
|
||||
}
|
||||
EXPORT_SYMBOL(__secpath_destroy);
|
||||
@@ -37,7 +37,7 @@ struct sec_path *secpath_dup(struct sec_path *src)
|
||||
|
||||
memcpy(sp, src, sizeof(*sp));
|
||||
for (i = 0; i < sp->len; i++)
|
||||
xfrm_state_hold(sp->x[i].xvec);
|
||||
xfrm_state_hold(sp->xvec[i]);
|
||||
}
|
||||
atomic_set(&sp->refcnt, 1);
|
||||
return sp;
|
||||
|
@@ -943,9 +943,9 @@ xfrm_policy_ok(struct xfrm_tmpl *tmpl, struct sec_path *sp, int start,
|
||||
} else
|
||||
start = -1;
|
||||
for (; idx < sp->len; idx++) {
|
||||
if (xfrm_state_ok(tmpl, sp->x[idx].xvec, family))
|
||||
if (xfrm_state_ok(tmpl, sp->xvec[idx], family))
|
||||
return ++idx;
|
||||
if (sp->x[idx].xvec->props.mode)
|
||||
if (sp->xvec[idx]->props.mode)
|
||||
break;
|
||||
}
|
||||
return start;
|
||||
@@ -968,7 +968,7 @@ EXPORT_SYMBOL(xfrm_decode_session);
|
||||
static inline int secpath_has_tunnel(struct sec_path *sp, int k)
|
||||
{
|
||||
for (; k < sp->len; k++) {
|
||||
if (sp->x[k].xvec->props.mode)
|
||||
if (sp->xvec[k]->props.mode)
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -994,8 +994,8 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb,
|
||||
int i;
|
||||
|
||||
for (i=skb->sp->len-1; i>=0; i--) {
|
||||
struct sec_decap_state *xvec = &(skb->sp->x[i]);
|
||||
if (!xfrm_selector_match(&xvec->xvec->sel, &fl, family))
|
||||
struct xfrm_state *x = skb->sp->xvec[i];
|
||||
if (!xfrm_selector_match(&x->sel, &fl, family))
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user