Skip to content

Commit

Permalink
xfrm: Fix crashes in xfrm_lookup()
Browse files Browse the repository at this point in the history
From: Timo Teräs <[email protected]>

Happens because CONFIG_XFRM_SUB_POLICY is not enabled, and one of
the helper functions I used did unexpected things in that case.

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
fabled authored and davem330 committed Apr 8, 2010
1 parent 0a5bff7 commit e4077e0
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -735,19 +735,12 @@ static inline void xfrm_pol_put(struct xfrm_policy *policy)
xfrm_policy_destroy(policy);
}

#ifdef CONFIG_XFRM_SUB_POLICY
static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols)
{
int i;
for (i = npols - 1; i >= 0; --i)
xfrm_pol_put(pols[i]);
}
#else
static inline void xfrm_pols_put(struct xfrm_policy **pols, int npols)
{
xfrm_pol_put(pols[0]);
}
#endif

extern void __xfrm_state_destroy(struct xfrm_state *);

Expand Down

0 comments on commit e4077e0

Please sign in to comment.