From b73cec26cd928bea52a2b746739ff251a7d0a732 Mon Sep 17 00:00:00 2001 From: Konstantin Ananyev Date: Mon, 14 Jan 2019 12:07:39 +0000 Subject: [PATCH] ipsec: fix assert condition fix invalid RTE_ASSERT condition in rsn_update_finish() Fixes: c0308cd89554 ("ipsec: rework SA replay window/SQN for MT environment") Reported-by: Ferruh Yigit Signed-off-by: Konstantin Ananyev Reviewed-by: Ferruh Yigit --- 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 7de10bef5a..a3ae7e2de4 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.20.1