aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/xfrm/xfrm_policy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index c546cf67801a..17854884f6ff 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -521,7 +521,7 @@ static DECLARE_WORK(xfrm_hash_work, xfrm_hash_resize);
521 521
522/* Generate new index... KAME seems to generate them ordered by cost 522/* Generate new index... KAME seems to generate them ordered by cost
523 * of an absolute inpredictability of ordering of rules. This will not pass. */ 523 * of an absolute inpredictability of ordering of rules. This will not pass. */
524static u32 xfrm_gen_index(u8 type, int dir) 524static u32 xfrm_gen_index(int dir)
525{ 525{
526 static u32 idx_generator; 526 static u32 idx_generator;
527 527
@@ -608,7 +608,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
608 list_del(&delpol->walk.all); 608 list_del(&delpol->walk.all);
609 xfrm_policy_count[dir]--; 609 xfrm_policy_count[dir]--;
610 } 610 }
611 policy->index = delpol ? delpol->index : xfrm_gen_index(policy->type, dir); 611 policy->index = delpol ? delpol->index : xfrm_gen_index(dir);
612 hlist_add_head(&policy->byidx, xfrm_policy_byidx+idx_hash(policy->index)); 612 hlist_add_head(&policy->byidx, xfrm_policy_byidx+idx_hash(policy->index));
613 policy->curlft.add_time = get_seconds(); 613 policy->curlft.add_time = get_seconds();
614 policy->curlft.use_time = 0; 614 policy->curlft.use_time = 0;
@@ -1138,7 +1138,7 @@ int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol)
1138 sk->sk_policy[dir] = pol; 1138 sk->sk_policy[dir] = pol;
1139 if (pol) { 1139 if (pol) {
1140 pol->curlft.add_time = get_seconds(); 1140 pol->curlft.add_time = get_seconds();
1141 pol->index = xfrm_gen_index(pol->type, XFRM_POLICY_MAX+dir); 1141 pol->index = xfrm_gen_index(XFRM_POLICY_MAX+dir);
1142 __xfrm_policy_link(pol, XFRM_POLICY_MAX+dir); 1142 __xfrm_policy_link(pol, XFRM_POLICY_MAX+dir);
1143 } 1143 }
1144 if (old_pol) 1144 if (old_pol)