All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipsec: fix invalid assert condition
@ 2019-01-14 12:07 Konstantin Ananyev
  2019-01-14 13:37 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Ananyev @ 2019-01-14 12:07 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, pablo.de.lara.guarch, ferruh.yigit, Konstantin Ananyev

fix invalid RTE_ASSERT condition in rsn_update_finish()

Fixes: c0308cd89554 ("ipsec: rework SA replay window/SQN for MT environment")

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ipsec/ipsec_sqn.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ipsec/ipsec_sqn.h b/lib/librte_ipsec/ipsec_sqn.h
index 7de10bef5..a3ae7e2de 100644
--- a/lib/librte_ipsec/ipsec_sqn.h
+++ b/lib/librte_ipsec/ipsec_sqn.h
@@ -333,7 +333,7 @@ rsn_update_finish(struct rte_ipsec_sa *sa, struct replay_sqn *rsn)
 
 	n = sa->sqn.inb.wridx;
 	RTE_ASSERT(n != sa->sqn.inb.rdidx);
-	RTE_ASSERT(rsn - sa->sqn.inb.rsn == n);
+	RTE_ASSERT(rsn == sa->sqn.inb.rsn[n]);
 
 	rte_rwlock_write_unlock(&rsn->rwl);
 	sa->sqn.inb.rdidx = n;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ipsec: fix invalid assert condition
  2019-01-14 12:07 [PATCH] ipsec: fix invalid assert condition Konstantin Ananyev
@ 2019-01-14 13:37 ` Ferruh Yigit
  2019-01-14 13:46   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2019-01-14 13:37 UTC (permalink / raw)
  To: Konstantin Ananyev, dev; +Cc: akhil.goyal, pablo.de.lara.guarch

On 1/14/2019 12:07 PM, Konstantin Ananyev wrote:
> fix invalid RTE_ASSERT condition in rsn_update_finish()
> 
> Fixes: c0308cd89554 ("ipsec: rework SA replay window/SQN for MT environment")
> 
> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ipsec: fix invalid assert condition
  2019-01-14 13:37 ` Ferruh Yigit
@ 2019-01-14 13:46   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2019-01-14 13:46 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: dev, Ferruh Yigit, akhil.goyal, pablo.de.lara.guarch

14/01/2019 14:37, Ferruh Yigit:
> On 1/14/2019 12:07 PM, Konstantin Ananyev wrote:
> > fix invalid RTE_ASSERT condition in rsn_update_finish()
> > 
> > Fixes: c0308cd89554 ("ipsec: rework SA replay window/SQN for MT environment")
> > 
> > Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-14 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14 12:07 [PATCH] ipsec: fix invalid assert condition Konstantin Ananyev
2019-01-14 13:37 ` Ferruh Yigit
2019-01-14 13:46   ` Thomas Monjalon

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.