[XFRM]: remove xerr_idxp from __xfrm_policy_check()
It seems that during the MIPv6 respin, some code which was originally conditionally compiled around CONFIG_XFRM_ADVANCED was accidently left in after the config option was removed. This patch removes an extraneous pointer (xerr_idxp) which is no longer needed. Signed-off-by: James Morris <jmorris@namei.org> Acked-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
eb878e8457
commit
d1d9facfd1
@@ -1514,7 +1514,6 @@ static inline int secpath_has_nontransport(struct sec_path *sp, int k, int *idxp
|
|||||||
{
|
{
|
||||||
for (; k < sp->len; k++) {
|
for (; k < sp->len; k++) {
|
||||||
if (sp->xvec[k]->props.mode != XFRM_MODE_TRANSPORT) {
|
if (sp->xvec[k]->props.mode != XFRM_MODE_TRANSPORT) {
|
||||||
if (idxp)
|
|
||||||
*idxp = k;
|
*idxp = k;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -1534,7 +1533,6 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb,
|
|||||||
struct flowi fl;
|
struct flowi fl;
|
||||||
u8 fl_dir = policy_to_flow_dir(dir);
|
u8 fl_dir = policy_to_flow_dir(dir);
|
||||||
int xerr_idx = -1;
|
int xerr_idx = -1;
|
||||||
int *xerr_idxp = &xerr_idx;
|
|
||||||
|
|
||||||
if (xfrm_decode_session(skb, &fl, family) < 0)
|
if (xfrm_decode_session(skb, &fl, family) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1560,7 +1558,7 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb,
|
|||||||
xfrm_policy_lookup);
|
xfrm_policy_lookup);
|
||||||
|
|
||||||
if (!pol) {
|
if (!pol) {
|
||||||
if (skb->sp && secpath_has_nontransport(skb->sp, 0, xerr_idxp)) {
|
if (skb->sp && secpath_has_nontransport(skb->sp, 0, &xerr_idx)) {
|
||||||
xfrm_secpath_reject(xerr_idx, skb, &fl);
|
xfrm_secpath_reject(xerr_idx, skb, &fl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1619,13 +1617,14 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb,
|
|||||||
for (i = xfrm_nr-1, k = 0; i >= 0; i--) {
|
for (i = xfrm_nr-1, k = 0; i >= 0; i--) {
|
||||||
k = xfrm_policy_ok(tpp[i], sp, k, family);
|
k = xfrm_policy_ok(tpp[i], sp, k, family);
|
||||||
if (k < 0) {
|
if (k < 0) {
|
||||||
if (k < -1 && xerr_idxp)
|
if (k < -1)
|
||||||
*xerr_idxp = -(2+k);
|
/* "-2 - errored_index" returned */
|
||||||
|
xerr_idx = -(2+k);
|
||||||
goto reject;
|
goto reject;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (secpath_has_nontransport(sp, k, xerr_idxp))
|
if (secpath_has_nontransport(sp, k, &xerr_idx))
|
||||||
goto reject;
|
goto reject;
|
||||||
|
|
||||||
xfrm_pols_put(pols, npols);
|
xfrm_pols_put(pols, npols);
|
||||||
|
Reference in New Issue
Block a user