summaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_input.c
diff options
context:
space:
mode:
authorAntony Antony <antony.antony@secunet.com>2022-10-21 15:42:01 +0200
committerSteffen Klassert <steffen.klassert@secunet.com>2022-10-25 10:24:08 +0200
commitf7fe25a6f00522791cce38bac552d295339d0c79 (patch)
tree3f6b2255d928958a669fcb6ace19a3d2b6a083d0 /net/xfrm/xfrm_input.c
parentesp6: remove redundant variable err (diff)
downloadlinux-f7fe25a6f00522791cce38bac552d295339d0c79.tar.xz
linux-f7fe25a6f00522791cce38bac552d295339d0c79.zip
xfrm: update x->lastused for every packet
x->lastused was only updated for outgoing mobile IPv6 packet. With this fix update it for every, in and out, packet. This is useful to check if the a SA is still in use, or when was the last time an SA was used. lastused time of in SA can used to check IPsec path is functional. Signed-off-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm/xfrm_input.c')
-rw-r--r--net/xfrm/xfrm_input.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index 97074f6f2bde..c06e54a10540 100644
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
@@ -671,6 +671,7 @@ resume:
x->curlft.bytes += skb->len;
x->curlft.packets++;
+ x->lastused = ktime_get_real_seconds();
spin_unlock(&x->lock);