summaryrefslogtreecommitdiff
path: root/net/ipv6/xfrm6_mode_ro.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-07-11 13:19:14 +0300
committerSteffen Klassert <steffen.klassert@secunet.com>2018-07-11 16:26:35 +0300
commit03dc7a35fcc83a199121a5156c4a7a976b836682 (patch)
tree3eb64568dea9ef596543d34547009d65b68c4222 /net/ipv6/xfrm6_mode_ro.c
parent386c5680e2e80b012de557cf8326962070e0897b (diff)
downloadlinux-03dc7a35fcc83a199121a5156c4a7a976b836682.tar.xz
ipv6: xfrm: use 64-bit timestamps
get_seconds() is deprecated because it can overflow on 32-bit architectures. For the xfrm_state->lastused member, we treat the data as a 64-bit number already, so we just need to use the right accessor that works on both 32-bit and 64-bit machines. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv6/xfrm6_mode_ro.c')
-rw-r--r--net/ipv6/xfrm6_mode_ro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/xfrm6_mode_ro.c b/net/ipv6/xfrm6_mode_ro.c
index 07d36573f50b..da28e4407b8f 100644
--- a/net/ipv6/xfrm6_mode_ro.c
+++ b/net/ipv6/xfrm6_mode_ro.c
@@ -55,7 +55,7 @@ static int xfrm6_ro_output(struct xfrm_state *x, struct sk_buff *skb)
__skb_pull(skb, hdr_len);
memmove(ipv6_hdr(skb), iph, hdr_len);
- x->lastused = get_seconds();
+ x->lastused = ktime_get_real_seconds();
return 0;
}