diff options
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 785c3e39f062..762926009c04 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -268,7 +268,7 @@ static inline unsigned long make_jiffies(long secs) | |||
268 | static void xfrm_policy_timer(unsigned long data) | 268 | static void xfrm_policy_timer(unsigned long data) |
269 | { | 269 | { |
270 | struct xfrm_policy *xp = (struct xfrm_policy*)data; | 270 | struct xfrm_policy *xp = (struct xfrm_policy*)data; |
271 | unsigned long now = (unsigned long)xtime.tv_sec; | 271 | unsigned long now = get_seconds(); |
272 | long next = LONG_MAX; | 272 | long next = LONG_MAX; |
273 | int warn = 0; | 273 | int warn = 0; |
274 | int dir; | 274 | int dir; |
@@ -690,7 +690,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) | |||
690 | } | 690 | } |
691 | policy->index = delpol ? delpol->index : xfrm_gen_index(policy->type, dir); | 691 | policy->index = delpol ? delpol->index : xfrm_gen_index(policy->type, dir); |
692 | hlist_add_head(&policy->byidx, xfrm_policy_byidx+idx_hash(policy->index)); | 692 | hlist_add_head(&policy->byidx, xfrm_policy_byidx+idx_hash(policy->index)); |
693 | policy->curlft.add_time = (unsigned long)xtime.tv_sec; | 693 | policy->curlft.add_time = get_seconds(); |
694 | policy->curlft.use_time = 0; | 694 | policy->curlft.use_time = 0; |
695 | if (!mod_timer(&policy->timer, jiffies + HZ)) | 695 | if (!mod_timer(&policy->timer, jiffies + HZ)) |
696 | xfrm_pol_hold(policy); | 696 | xfrm_pol_hold(policy); |
@@ -1049,7 +1049,7 @@ static inline int policy_to_flow_dir(int dir) | |||
1049 | return FLOW_DIR_OUT; | 1049 | return FLOW_DIR_OUT; |
1050 | case XFRM_POLICY_FWD: | 1050 | case XFRM_POLICY_FWD: |
1051 | return FLOW_DIR_FWD; | 1051 | return FLOW_DIR_FWD; |
1052 | }; | 1052 | } |
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | static struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir, struct flowi *fl) | 1055 | static struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir, struct flowi *fl) |
@@ -1133,7 +1133,7 @@ int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol) | |||
1133 | old_pol = sk->sk_policy[dir]; | 1133 | old_pol = sk->sk_policy[dir]; |
1134 | sk->sk_policy[dir] = pol; | 1134 | sk->sk_policy[dir] = pol; |
1135 | if (pol) { | 1135 | if (pol) { |
1136 | pol->curlft.add_time = (unsigned long)xtime.tv_sec; | 1136 | pol->curlft.add_time = get_seconds(); |
1137 | pol->index = xfrm_gen_index(pol->type, XFRM_POLICY_MAX+dir); | 1137 | pol->index = xfrm_gen_index(pol->type, XFRM_POLICY_MAX+dir); |
1138 | __xfrm_policy_link(pol, XFRM_POLICY_MAX+dir); | 1138 | __xfrm_policy_link(pol, XFRM_POLICY_MAX+dir); |
1139 | } | 1139 | } |
@@ -1386,7 +1386,7 @@ restart: | |||
1386 | return 0; | 1386 | return 0; |
1387 | 1387 | ||
1388 | family = dst_orig->ops->family; | 1388 | family = dst_orig->ops->family; |
1389 | policy->curlft.use_time = (unsigned long)xtime.tv_sec; | 1389 | policy->curlft.use_time = get_seconds(); |
1390 | pols[0] = policy; | 1390 | pols[0] = policy; |
1391 | npols ++; | 1391 | npols ++; |
1392 | xfrm_nr += pols[0]->xfrm_nr; | 1392 | xfrm_nr += pols[0]->xfrm_nr; |
@@ -1682,7 +1682,7 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, | |||
1682 | return 1; | 1682 | return 1; |
1683 | } | 1683 | } |
1684 | 1684 | ||
1685 | pol->curlft.use_time = (unsigned long)xtime.tv_sec; | 1685 | pol->curlft.use_time = get_seconds(); |
1686 | 1686 | ||
1687 | pols[0] = pol; | 1687 | pols[0] = pol; |
1688 | npols ++; | 1688 | npols ++; |
@@ -1694,7 +1694,7 @@ int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, | |||
1694 | if (pols[1]) { | 1694 | if (pols[1]) { |
1695 | if (IS_ERR(pols[1])) | 1695 | if (IS_ERR(pols[1])) |
1696 | return 0; | 1696 | return 0; |
1697 | pols[1]->curlft.use_time = (unsigned long)xtime.tv_sec; | 1697 | pols[1]->curlft.use_time = get_seconds(); |
1698 | npols ++; | 1698 | npols ++; |
1699 | } | 1699 | } |
1700 | } | 1700 | } |