+static clib_error_t *
+test_src_dst_deser_bad_afi (void)
+{
+ clib_error_t * error = 0;
+
+ u8 expected_data[] =
+ {
+ 0x40, 0x03, 0x00, 0x00, /* AFI = LCAF, reserved1, flags */
+ 0x0c, 0x00, 0x00, 0x14, /* LCAF type = source/dest key, rsvd, length */
+ 0x00, 0x00, 0x00, 0x00, /* reserved; source-ML, Dest-ML */
+
+ 0xde, 0xad, /* AFI = bad value */
+ 0x11, 0x22, 0x33, 0x44,
+ 0x55, 0x66, /* source */
+
+ 0x40, 0x05, /* AFI = MAC */
+ 0x10, 0x21, 0x32, 0x43,
+ 0x54, 0x65, /* destination */
+ };
+
+ gid_address_t p;
+ _assert (~0 == gid_address_parse (expected_data, &p));
+done:
+ return error;
+}
+