aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2006-09-01 03:32:12 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 18:18:49 -0400
commitd1d9facfd1b326e0df587c96f0ee55de2ae9f946 (patch)
treea451927f0a8269ce7a34ca0cb833c0f5d16f2576 /net
parenteb878e84575fbce21d2edb079eada78bfa27023d (diff)
[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>
Diffstat (limited to 'net')
-rw-r--r--net/xfrm/xfrm_policy.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 7db1c48537f0..537854fe47ca 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1514,8 +1514,7 @@ static inline int secpath_has_nontransport(struct sec_path *sp, int k, int *idxp
1514{ 1514{
1515 for (; k < sp->len; k++) { 1515 for (; k < sp->len; k++) {
1516 if (sp->xvec[k]->props.mode != XFRM_MODE_TRANSPORT) { 1516 if (sp->xvec[k]->props.mode != XFRM_MODE_TRANSPORT) {
1517 if (idxp) 1517 *idxp = k;
1518 *idxp = k;
1519 return 1; 1518 return 1;
1520 } 1519 }
1521 } 1520 }
@@ -1534,7 +1533,6 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb,
1534 struct flowi fl; 1533 struct flowi fl;
1535 u8 fl_dir = policy_to_flow_dir(dir); 1534 u8 fl_dir = policy_to_flow_dir(dir);
1536 int xerr_idx = -1; 1535 int xerr_idx = -1;
1537 int *xerr_idxp = &xerr_idx;
1538 1536
1539 if (xfrm_decode_session(skb, &fl, family) < 0) 1537 if (xfrm_decode_session(skb, &fl, family) < 0)
1540 return 0; 1538 return 0;
@@ -1560,7 +1558,7 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb,
1560 xfrm_policy_lookup); 1558 xfrm_policy_lookup);
1561 1559
1562 if (!pol) { 1560 if (!pol) {
1563 if (skb->sp && secpath_has_nontransport(skb->sp, 0, xerr_idxp)) { 1561 if (skb->sp && secpath_has_nontransport(skb->sp, 0, &xerr_idx)) {
1564 xfrm_secpath_reject(xerr_idx, skb, &fl); 1562 xfrm_secpath_reject(xerr_idx, skb, &fl);
1565 return 0; 1563 return 0;
1566 } 1564 }
@@ -1619,13 +1617,14 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb,
1619 for (i = xfrm_nr-1, k = 0; i >= 0; i--) { 1617 for (i = xfrm_nr-1, k = 0; i >= 0; i--) {
1620 k = xfrm_policy_ok(tpp[i], sp, k, family); 1618 k = xfrm_policy_ok(tpp[i], sp, k, family);
1621 if (k < 0) { 1619 if (k < 0) {
1622 if (k < -1 && xerr_idxp) 1620 if (k < -1)
1623 *xerr_idxp = -(2+k); 1621 /* "-2 - errored_index" returned */
1622 xerr_idx = -(2+k);
1624 goto reject; 1623 goto reject;
1625 } 1624 }
1626 } 1625 }
1627 1626
1628 if (secpath_has_nontransport(sp, k, xerr_idxp)) 1627 if (secpath_has_nontransport(sp, k, &xerr_idx))
1629 goto reject; 1628 goto reject;
1630 1629
1631 xfrm_pols_put(pols, npols); 1630 xfrm_pols_put(pols, npols);