summaryrefslogtreecommitdiff
path: root/lib/librte_ipsec
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2019-01-14 12:07:39 +0000
committerThomas Monjalon <thomas@monjalon.net>2019-01-14 14:45:02 +0100
commitb73cec26cd928bea52a2b746739ff251a7d0a732 (patch)
tree124002a9bfbe751b934f706fc5155681cc72978a /lib/librte_ipsec
parent3d5501d568aacbcf71832691278f5656d3a9b649 (diff)
downloaddpdk-b73cec26cd928bea52a2b746739ff251a7d0a732.zip
dpdk-b73cec26cd928bea52a2b746739ff251a7d0a732.tar.gz
dpdk-b73cec26cd928bea52a2b746739ff251a7d0a732.tar.xz
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 <ferruh.yigit@intel.com> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'lib/librte_ipsec')
-rw-r--r--lib/librte_ipsec/ipsec_sqn.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/librte_ipsec/ipsec_sqn.h b/lib/librte_ipsec/ipsec_sqn.h
index 7de10be..a3ae7e2 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;