From: Antony Antony <antony.antony@secunet.com> To: Steffen Klassert <steffen.klassert@secunet.com>, Herbert Xu <herbert@gondor.apana.org.au>, <0002-xfrm-fix-XFRMA_LASTUSED-comment.patch@moon.secunet.de>, <0003-xfrm-clone-missing-x-lastused-in-xfrm_do_migrate.patch@moon.secunet.de> Cc: <netdev@vger.kernel.org>, Tobias Brunner <tobias@strongswan.org> Subject: [PATCH ipsec 1/3] Revert "xfrm: update SA curlft.use_time" Date: Wed, 27 Jul 2022 17:38:35 +0200 [thread overview] Message-ID: <e66a68873492c0b3e02f8459e88cedabe255e3b6.1658936270.git.antony.antony@secunet.com> (raw) In-Reply-To: <3e201e1156639286e1874ebc29233741b8b2ac54.1657260947.git.antony.antony@secunet.com> 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> --- net/xfrm/xfrm_input.c | 1 - net/xfrm/xfrm_output.c | 1 - 2 files changed, 2 deletions(-) diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 144238a50f3d..70a8c36f0ba6 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -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.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 555ab35cd119..9a5e79a38c67 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c @@ -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); -- 2.30.2
WARNING: multiple messages have this Message-ID (diff)
From: Antony Antony <antony.antony@secunet.com> To: Steffen Klassert <steffen.klassert@secunet.com>, Herbert Xu <herbert@gondor.apana.org.au> Cc: <netdev@vger.kernel.org>, Tobias Brunner <tobias@strongswan.org>, "Antony Antony" <antony.antony@secunet.com> Subject: [PATCH ipsec 1/3] Revert "xfrm: update SA curlft.use_time" Date: Wed, 27 Jul 2022 17:45:02 +0200 [thread overview] Message-ID: <e66a68873492c0b3e02f8459e88cedabe255e3b6.1658936270.git.antony.antony@secunet.com> (raw) Message-ID: <20220727154502.LfPDQdkOH-B14ajdvDPYbeN_ozdHMYphwa08O5dgdLo@z> (raw) In-Reply-To: <3e201e1156639286e1874ebc29233741b8b2ac54.1657260947.git.antony.antony@secunet.com> 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> --- net/xfrm/xfrm_input.c | 1 - net/xfrm/xfrm_output.c | 1 - 2 files changed, 2 deletions(-) diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 144238a50f3d..70a8c36f0ba6 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -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.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 555ab35cd119..9a5e79a38c67 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c @@ -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); -- 2.30.2
next prev parent reply other threads:[~2022-07-27 15:38 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-08 6:16 [PATCH ipsec-next 1/4] Revert "xfrm: update SA curlft.use_time" Antony Antony 2022-07-08 6:16 ` [PATCH ipsec-next 2/4] xfrm: fix XFRMA_LASTUSED comment Antony Antony 2022-07-08 6:17 ` [PATCH ipsec-next 3/4] xfrm: update x->lastused for every packet Antony Antony 2022-07-08 6:18 ` [PATCH ipsec-next 4/4] xfrm: clone x->lastused in xfrm_do_migrate Antony Antony 2022-07-11 8:34 ` Steffen Klassert 2022-07-11 8:24 ` [PATCH ipsec-next 1/4] Revert "xfrm: update SA curlft.use_time" Steffen Klassert 2022-07-27 15:38 ` Antony Antony [this message] 2022-07-27 15:45 ` [PATCH ipsec 1/3] " Antony Antony 2022-08-04 9:31 ` Steffen Klassert 2022-07-27 15:40 ` [PATCH ipsec 2/3] xfrm: fix XFRMA_LASTUSED comment Antony Antony 2022-07-27 15:41 ` [PATCH ipsec 3/3] xfrm: clone missing x->lastused in xfrm_do_migrate Antony Antony 2022-10-21 13:42 ` [PATCH ipsec-next v2] xfrm: update x->lastused for every packet Antony Antony 2022-10-28 11:35 ` Steffen Klassert
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=e66a68873492c0b3e02f8459e88cedabe255e3b6.1658936270.git.antony.antony@secunet.com \ --to=antony.antony@secunet.com \ --cc=0002-xfrm-fix-XFRMA_LASTUSED-comment.patch@moon.secunet.de \ --cc=0003-xfrm-clone-missing-x-lastused-in-xfrm_do_migrate.patch@moon.secunet.de \ --cc=herbert@gondor.apana.org.au \ --cc=netdev@vger.kernel.org \ --cc=steffen.klassert@secunet.com \ --cc=tobias@strongswan.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.