};
static const struct tok lisp_type [] = {
- { 0, "LISP-Reserved" },
- { 1, "LISP-Map-Request" },
- { 2, "LISP-Map-Reply" },
- { 3, "LISP-Map-Register" },
- { 4, "LISP-Map-Notify" },
- { 8, "LISP-Encapsulated-Control-Message" },
+ { 0, "Reserved" },
+ { 1, "Map-Request" },
+ { 2, "Map-Reply" },
+ { 3, "Map-Register" },
+ { 4, "Map-Notify" },
+ { 8, "Encapsulated-Control-Message" },
{ 0, NULL }
};
const lisp_map_register_loc *lisp_loc;
ndo->ndo_protocol = "lisp";
+ nd_print_protocol_caps(ndo);
+ ND_ICHECK_ZU(length, <, MAP_REGISTER_HDR_LEN);
lisp_hdr = (const lisp_map_register_hdr *) bp;
lisp_hdr_flag(ndo, lisp_hdr);
/* Supporting only MAP NOTIFY and MAP REGISTER LISP packets */
ND_PRINT("\n %u record(s), ", record_count);
ND_PRINT("Authentication %s,",
tok2str(auth_type, "unknown-type", key_id));
+ ND_ICHECKMSG_ZU("authentication data length", auth_data_len, >,
+ length - MAP_REGISTER_HDR_LEN);
hex_print(ndo, "\n Authentication-Data: ",
bp + packet_offset, auth_data_len);
} else {
ND_PRINT(" %u record(s),", record_count);
+ ND_ICHECKMSG_ZU("authentication data length", auth_data_len, >,
+ length - MAP_REGISTER_HDR_LEN);
}
packet_offset += auth_data_len;
- ND_ICHECK_U(record_count, ==, 0);
+ ND_ICHECKMSG_U("record count", record_count, ==, 0);
/* Print all the EID records */
while ((length > packet_offset) && (record_count != 0)) {
packet_offset += 16;
break;
default:
+ ND_PRINT(" [unsupported address family identifier %u]",
+ eid_afi);
/*
* No support for LCAF right now.
*/
{
uint8_t type = extract_lisp_type(GET_U_1(lisp_hdr->type_and_flag));
- ND_PRINT("%s,", tok2str(lisp_type, "unknown-type-%u", type));
+ ND_PRINT("-%s,", tok2str(lisp_type, "unknown-type-%u", type));
if (!ndo->ndo_vflag)
return;