@@ -354,9 +354,11 @@ odp_bool_t ipsec_check_packet(const ipsec_test_packet *itp, odp_packet_t pkt)
l4 = odp_packet_l4_offset(pkt);
odp_packet_copy_to_mem(pkt, 0, len, data);
+ CU_ASSERT_EQUAL(len - l3, itp->len - itp->l3_offset);
if (len - l3 != itp->len - itp->l3_offset)
return false;
+ CU_ASSERT_EQUAL(l4 - l3, itp->l4_offset - itp->l3_offset);
if (l4 - l3 != itp->l4_offset - itp->l3_offset)
return false;
@@ -31,6 +31,8 @@ KEY(key_rfc3602, 0x90, 0xd3, 0x82, 0xb4, 0x10, 0xee, 0xba, 0x7a,
0xd9, 0x38, 0xc4, 0x6c, 0xec, 0x1a, 0x82, 0xbf);
KEY(key_rfc3602_2, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef);
+KEY(key_mcgrew_gcm_test_1, 0x4c, 0x80, 0xcd, 0xef, 0xbb, 0x5d, 0x10, 0xda,
+ 0x90, 0x6a, 0xc7, 0x3c, 0x36, 0x13, 0xa6, 0x34);
static const ODP_UNUSED ipsec_test_packet pkt_icmp_0 = {
.len = 142,
@@ -725,4 +727,26 @@ static const ipsec_test_packet pkt_rfc3602_8_esp = {
},
};
+static const ipsec_test_packet pkt_mcgrew_gcm_test_1 = {
+ .len = 72,
+ .l2_offset = ODP_PACKET_OFFSET_INVALID,
+ .l3_offset = 0,
+ .l4_offset = 20,
+ .data = {
+ /* IP */
+ 0x45, 0x00, 0x00, 0x48, 0x69, 0x9a, 0x00, 0x00,
+ 0x80, 0x11, 0x4d, 0xb7, 0xc0, 0xa8, 0x01, 0x02,
+ 0xc0, 0xa8, 0x01, 0x01,
+
+ /* UDP */
+ 0x0a, 0x9b, 0xf1, 0x56, 0x38, 0xd3, 0x01, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x5f, 0x73, 0x69, 0x70, 0x04, 0x5f, 0x75,
+ 0x64, 0x70, 0x03, 0x73, 0x69, 0x70, 0x09, 0x63,
+ 0x79, 0x62, 0x65, 0x72, 0x63, 0x69, 0x74, 0x79,
+ 0x02, 0x64, 0x6b, 0x00, 0x00, 0x21, 0x00, 0x01,
+ 0x01, 0x02, 0x02, 0x01,
+ },
+};
+
#endif