summaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorAntony Antony <antony.antony@secunet.com>2021-12-17 18:02:09 +0100
committerSteffen Klassert <steffen.klassert@secunet.com>2021-12-23 09:32:50 +0100
commitaf734a26a1a95a9fda51f2abb0c22a7efcafd5ca (patch)
treee0a3eaba4f479b796f5b1c7eb9a27af522c09a4e /net/xfrm
parentac1077e92825bb0ffeee8550a41771df772214ce (diff)
downloadlinux-af734a26a1a95a9fda51f2abb0c22a7efcafd5ca.tar.gz
linux-af734a26a1a95a9fda51f2abb0c22a7efcafd5ca.tar.bz2
linux-af734a26a1a95a9fda51f2abb0c22a7efcafd5ca.zip
xfrm: update SA curlft.use_time
SA use_time was only updated once, for the first packet. with this fix update the use_time for every packet. Signed-off-by: Antony Antony <antony.antony@secunet.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_input.c1
-rw-r--r--net/xfrm/xfrm_output.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index 70a8c36f0ba6..144238a50f3d 100644
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
@@ -669,6 +669,7 @@ resume:
x->curlft.bytes += skb->len;
x->curlft.packets++;
+ x->curlft.use_time = ktime_get_real_seconds();
spin_unlock(&x->lock);
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index 229544bc70c2..3585bfc302f9 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -533,6 +533,7 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
x->curlft.bytes += skb->len;
x->curlft.packets++;
+ x->curlft.use_time = ktime_get_real_seconds();
spin_unlock_bh(&x->lock);