{ 0, NULL}
};
-/* draft-ietf-idr-cease-subcode-02 */
+/* RFC 4486 */
#define BGP_NOTIFY_MINOR_CEASE_MAXPRFX 1
-/* draft-ietf-idr-shutdown-07 */
#define BGP_NOTIFY_MINOR_CEASE_SHUT 2
#define BGP_NOTIFY_MINOR_CEASE_RESET 4
static const struct tok bgp_notify_minor_cease_values[] = {
const struct bgp_notification *bgp_notification_header;
const u_char *tptr;
uint8_t bgpn_major, bgpn_minor;
- uint8_t shutdown_comm_length;
- uint8_t remainder_offset;
ND_TCHECK_LEN(dat, BGP_NOTIFICATION_SIZE);
if (length<BGP_NOTIFICATION_SIZE)
bgpn_minor),
bgpn_minor);
- /* draft-ietf-idr-cease-subcode-02 mentions optionally 7 bytes
+ /* RFC 4486 mentions optionally 7 bytes
* for the maxprefix subtype, which may contain AFI, SAFI and MAXPREFIXES
*/
if(bgpn_minor == BGP_NOTIFY_MINOR_CEASE_MAXPRFX && length >= BGP_NOTIFICATION_SIZE + 7) {
GET_BE_U_4(tptr + 3));
}
/*
- * draft-ietf-idr-shutdown describes a method to send a communication
+ * RFC 9003 describes a method to send a communication
* intended for human consumption regarding the Administrative Shutdown
*/
if ((bgpn_minor == BGP_NOTIFY_MINOR_CEASE_SHUT ||
bgpn_minor == BGP_NOTIFY_MINOR_CEASE_RESET) &&
length >= BGP_NOTIFICATION_SIZE + 1) {
tptr = dat + BGP_NOTIFICATION_SIZE;
- shutdown_comm_length = GET_U_1(tptr);
- remainder_offset = 0;
+ uint8_t shutdown_comm_length = GET_U_1(tptr);
+ uint8_t remainder_offset = 0;
/* garbage, hexdump it all */
if (shutdown_comm_length > length - (BGP_NOTIFICATION_SIZE + 1)) {
ND_PRINT(", invalid Shutdown Communication length");
}
/* a proper shutdown communication */
else {
- ND_TCHECK_LEN(tptr + 1, shutdown_comm_length);
ND_PRINT(", Shutdown Communication (length: %u): \"", shutdown_comm_length);
nd_printjn(ndo, tptr+1, shutdown_comm_length);
ND_PRINT("\"");