]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Revert "xfrm: update SA curlft.use_time"
authorAntony Antony <antony.antony@secunet.com>
Wed, 27 Jul 2022 15:38:35 +0000 (17:38 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 3 Aug 2022 05:27:37 +0000 (07:27 +0200)
This reverts commit af734a26a1a95a9fda51f2abb0c22a7efcafd5ca.

The abvoce commit is a regression according RFC 2367. A better fix would be
use x->lastused. Which will be propsed later.

according to RFC 2367 use_time == sadb_lifetime_usetime.

"sadb_lifetime_usetime
                   For CURRENT, the time, in seconds, when association
                   was first used. For HARD and SOFT, the number of
                   seconds after the first use of the association until
                   it expires."

Fixes: af734a26a1a9 ("xfrm: update SA curlft.use_time")
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_input.c
net/xfrm/xfrm_output.c

index 144238a50f3d4e1efc99eb8e893650e60f1b3bda..70a8c36f0ba6e6acc8743a1e85bbf2c18842c0f2 100644 (file)
@@ -669,7 +669,6 @@ resume:
 
                x->curlft.bytes += skb->len;
                x->curlft.packets++;
-               x->curlft.use_time = ktime_get_real_seconds();
 
                spin_unlock(&x->lock);
 
index 555ab35cd119a71ba5828e90c3fc297383194d6e..9a5e79a38c6797e86648178090601471c2e68584 100644 (file)
@@ -534,7 +534,6 @@ 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);