diff options
author | Janne Peltonen <janne.peltonen@nokia.com> | 2021-09-09 15:11:39 +0300 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2021-09-29 14:30:29 +0300 |
commit | 1047a9a5a75babae1c53b35924a594ba0888a420 (patch) | |
tree | 9ceb544a891035b8bf20220f9da64f6c82cc5887 /test/validation | |
parent | 931e5cbdddd3a9a61f7e9afa373841ae947aede2 (diff) |
validation: ipsec: check original packet length in IPsec packet result
Check that the original IP length returned in IPsec packet result after
inline or async inbound processing matches the IP length of the inbound
test packet.
Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'test/validation')
-rw-r--r-- | test/validation/api/ipsec/ipsec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/validation/api/ipsec/ipsec.c b/test/validation/api/ipsec/ipsec.c index 16774945a..030cc2962 100644 --- a/test/validation/api/ipsec/ipsec.c +++ b/test/validation/api/ipsec/ipsec.c @@ -936,6 +936,11 @@ static void verify_in(const ipsec_test_part *part, if (ODP_IPSEC_SA_INVALID != sa) CU_ASSERT_EQUAL(IPSEC_SA_CTX, odp_ipsec_sa_context(sa)); + if (suite_context.inbound_op_mode != ODP_IPSEC_OP_MODE_SYNC) { + uint32_t len = part->pkt_in->len - part->pkt_in->l3_offset; + + CU_ASSERT(result.orig_ip_len == len); + } } ipsec_check_packet(part->out[i].pkt_res, pkto[i], |