提交 717ada9f 编写于 作者: A Antony Antony 提交者: Steffen Klassert

Revert "xfrm: update SA curlft.use_time"

This reverts commit af734a26.

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: af734a26 ("xfrm: update SA curlft.use_time")
Signed-off-by: NAntony Antony <antony.antony@secunet.com>
Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
上级 9c9cb23e
...@@ -669,7 +669,6 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type) ...@@ -669,7 +669,6 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
x->curlft.bytes += skb->len; x->curlft.bytes += skb->len;
x->curlft.packets++; x->curlft.packets++;
x->curlft.use_time = ktime_get_real_seconds();
spin_unlock(&x->lock); spin_unlock(&x->lock);
......
...@@ -534,7 +534,6 @@ static int xfrm_output_one(struct sk_buff *skb, int err) ...@@ -534,7 +534,6 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
x->curlft.bytes += skb->len; x->curlft.bytes += skb->len;
x->curlft.packets++; x->curlft.packets++;
x->curlft.use_time = ktime_get_real_seconds();
spin_unlock_bh(&x->lock); spin_unlock_bh(&x->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册