From: Konstantin Ananyev Date: Mon, 14 Jan 2019 12:07:39 +0000 (+0000) Subject: ipsec: fix assert condition X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b73cec26cd928bea52a2b746739ff251a7d0a732;p=dpdk.git 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 --- 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;