summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_attr.c25
-rw-r--r--bgpd/bgp_debug.c28
-rw-r--r--bgpd/bgp_debug.h1
-rw-r--r--bgpd/bgp_fsm.c16
-rw-r--r--bgpd/bgp_open.c20
-rw-r--r--bgpd/bgp_packet.c6
-rw-r--r--bgpd/bgp_vty.c10
-rw-r--r--bgpd/bgpd.h6
-rw-r--r--bgpd/rfapi/rfapi_import.c2
9 files changed, 54 insertions, 60 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index cf2e48759..1e9b11022 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -79,9 +79,9 @@ static const struct message attr_str [] =
{ BGP_ATTR_VNC, "VNC" },
#endif
{ BGP_ATTR_LARGE_COMMUNITIES, "LARGE_COMMUNITY" },
- { BGP_ATTR_PREFIX_SID, "PREFIX_SID" }
+ { BGP_ATTR_PREFIX_SID, "PREFIX_SID" },
+ { 0 }
};
-static const int attr_str_max = array_size(attr_str);
static const struct message attr_flag_str[] =
{
@@ -90,6 +90,7 @@ static const struct message attr_flag_str[] =
{ BGP_ATTR_FLAG_PARTIAL, "Partial" },
/* bgp_attr_flags_diagnose() relies on this bit being last in this list */
{ BGP_ATTR_FLAG_EXTLEN, "Extended Length" },
+ { 0 }
};
static struct hash *cluster_hash;
@@ -1239,7 +1240,7 @@ bgp_attr_flags_diagnose (struct bgp_attr_parser_args *args,
)
{
zlog_err ("%s attribute must%s be flagged as \"%s\"",
- LOOKUP (attr_str, attr_code),
+ lookup_msg(attr_str, attr_code, NULL),
CHECK_FLAG (desired_flags, attr_flag_str[i].key) ? "" : " not",
attr_flag_str[i].str);
seen = 1;
@@ -1248,7 +1249,7 @@ bgp_attr_flags_diagnose (struct bgp_attr_parser_args *args,
{
zlog_debug ("Strange, %s called for attr %s, but no problem found with flags"
" (real flags 0x%x, desired 0x%x)",
- __func__, LOOKUP (attr_str, attr_code),
+ __func__, lookup_msg(attr_str, attr_code, NULL),
real_flags, desired_flags);
}
}
@@ -1297,7 +1298,7 @@ bgp_attr_flag_invalid (struct bgp_attr_parser_args *args)
&& !CHECK_FLAG (BGP_ATTR_FLAG_TRANS, flags))
{
zlog_err ("%s well-known attributes must have transitive flag set (%x)",
- LOOKUP (attr_str, attr_code), flags);
+ lookup_msg(attr_str, attr_code, NULL), flags);
return 1;
}
@@ -1310,7 +1311,7 @@ bgp_attr_flag_invalid (struct bgp_attr_parser_args *args)
{
zlog_err ("%s well-known attribute "
"must NOT have the partial flag set (%x)",
- LOOKUP (attr_str, attr_code), flags);
+ lookup_msg(attr_str, attr_code, NULL), flags);
return 1;
}
if (CHECK_FLAG (flags, BGP_ATTR_FLAG_OPTIONAL)
@@ -1318,7 +1319,7 @@ bgp_attr_flag_invalid (struct bgp_attr_parser_args *args)
{
zlog_err ("%s optional + transitive attribute "
"must NOT have the partial flag set (%x)",
- LOOKUP (attr_str, attr_code), flags);
+ lookup_msg(attr_str, attr_code, NULL), flags);
return 1;
}
}
@@ -2460,7 +2461,7 @@ bgp_attr_check (struct peer *peer, struct attr *attr)
if (type)
{
zlog_warn ("%s Missing well-known attribute %s.", peer->host,
- LOOKUP (attr_str, type));
+ lookup_msg(attr_str, type, NULL));
bgp_notify_send_with_data (peer,
BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_MISS_ATTR,
@@ -2679,7 +2680,7 @@ bgp_attr_parse (struct peer *peer, struct attr *attr, bgp_size_t size,
{
zlog_warn ("%s: Attribute %s, parse error",
peer->host,
- LOOKUP (attr_str, type));
+ lookup_msg(attr_str, type, NULL));
if (as4_path)
aspath_unintern (&as4_path);
return ret;
@@ -2689,7 +2690,7 @@ bgp_attr_parse (struct peer *peer, struct attr *attr, bgp_size_t size,
zlog_warn ("%s: Attribute %s, parse error - treating as withdrawal",
peer->host,
- LOOKUP (attr_str, type));
+ lookup_msg(attr_str, type, NULL));
if (as4_path)
aspath_unintern (&as4_path);
return ret;
@@ -2699,7 +2700,7 @@ bgp_attr_parse (struct peer *peer, struct attr *attr, bgp_size_t size,
if (BGP_INPUT_PNT (peer) != attr_endp)
{
zlog_warn ("%s: BGP attribute %s, fetch error",
- peer->host, LOOKUP (attr_str, type));
+ peer->host, lookup_msg(attr_str, type, NULL));
bgp_notify_send (peer,
BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_ATTR_LENG_ERR);
@@ -2713,7 +2714,7 @@ bgp_attr_parse (struct peer *peer, struct attr *attr, bgp_size_t size,
if (BGP_INPUT_PNT (peer) != endp)
{
zlog_warn ("%s: BGP attribute %s, length mismatch",
- peer->host, LOOKUP (attr_str, type));
+ peer->host, lookup_msg(attr_str, type, NULL));
bgp_notify_send (peer,
BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_ATTR_LENG_ERR);
diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c
index a39ec90cc..8a2ec3b49 100644
--- a/bgpd/bgp_debug.c
+++ b/bgpd/bgp_debug.c
@@ -85,8 +85,8 @@ const struct message bgp_status_msg[] =
{ Established, "Established" },
{ Clearing, "Clearing" },
{ Deleted, "Deleted" },
+ { 0 }
};
-const int bgp_status_msg_max = BGP_STATUS_MAX;
/* BGP message type string. */
const char *bgp_type_str[] =
@@ -110,16 +110,16 @@ static const struct message bgp_notify_msg[] =
{ BGP_NOTIFY_FSM_ERR, "Neighbor Events Error"},
{ BGP_NOTIFY_CEASE, "Cease"},
{ BGP_NOTIFY_CAPABILITY_ERR, "CAPABILITY Message Error"},
+ { 0 }
};
-static const int bgp_notify_msg_max = BGP_NOTIFY_MAX;
static const struct message bgp_notify_head_msg[] =
{
{ BGP_NOTIFY_HEADER_NOT_SYNC, "/Connection Not Synchronized"},
{ BGP_NOTIFY_HEADER_BAD_MESLEN, "/Bad Message Length"},
- { BGP_NOTIFY_HEADER_BAD_MESTYPE, "/Bad Message Type"}
+ { BGP_NOTIFY_HEADER_BAD_MESTYPE, "/Bad Message Type"},
+ { 0 }
};
-static const int bgp_notify_head_msg_max = BGP_NOTIFY_HEADER_MAX;
static const struct message bgp_notify_open_msg[] =
{
@@ -131,8 +131,8 @@ static const struct message bgp_notify_open_msg[] =
{ BGP_NOTIFY_OPEN_AUTH_FAILURE, "/Authentication Failure"},
{ BGP_NOTIFY_OPEN_UNACEP_HOLDTIME, "/Unacceptable Hold Time"},
{ BGP_NOTIFY_OPEN_UNSUP_CAPBL, "/Unsupported Capability"},
+ { 0 }
};
-static const int bgp_notify_open_msg_max = BGP_NOTIFY_OPEN_MAX;
static const struct message bgp_notify_update_msg[] =
{
@@ -148,8 +148,8 @@ static const struct message bgp_notify_update_msg[] =
{ BGP_NOTIFY_UPDATE_OPT_ATTR_ERR, "/Optional Attribute Error"},
{ BGP_NOTIFY_UPDATE_INVAL_NETWORK, "/Invalid Network Field"},
{ BGP_NOTIFY_UPDATE_MAL_AS_PATH, "/Malformed AS_PATH"},
+ { 0 }
};
-static const int bgp_notify_update_msg_max = BGP_NOTIFY_UPDATE_MAX;
static const struct message bgp_notify_cease_msg[] =
{
@@ -162,8 +162,8 @@ static const struct message bgp_notify_cease_msg[] =
{ BGP_NOTIFY_CEASE_CONFIG_CHANGE, "/Other Configuration Change"},
{ BGP_NOTIFY_CEASE_COLLISION_RESOLUTION, "/Connection collision resolution"},
{ BGP_NOTIFY_CEASE_OUT_OF_RESOURCE, "/Out of Resource"},
+ { 0 }
};
-static const int bgp_notify_cease_msg_max = BGP_NOTIFY_CEASE_MAX;
static const struct message bgp_notify_capability_msg[] =
{
@@ -171,8 +171,8 @@ static const struct message bgp_notify_capability_msg[] =
{ BGP_NOTIFY_CAPABILITY_INVALID_ACTION, "/Invalid Action Value" },
{ BGP_NOTIFY_CAPABILITY_INVALID_LENGTH, "/Invalid Capability Length"},
{ BGP_NOTIFY_CAPABILITY_MALFORMED_CODE, "/Malformed Capability Value"},
+ { 0 }
};
-static const int bgp_notify_capability_msg_max = BGP_NOTIFY_CAPABILITY_MAX;
/* Origin strings. */
const char *bgp_origin_str[] = {"i","e","?"};
@@ -464,7 +464,7 @@ bgp_dump_attr (struct attr *attr, char *buf, size_t size)
const char *
bgp_notify_code_str (char code)
{
- return LOOKUP_DEF (bgp_notify_msg, code, "Unrecognized Error Code");
+ return lookup_msg (bgp_notify_msg, code, "Unrecognized Error Code");
}
const char *
@@ -474,23 +474,23 @@ bgp_notify_subcode_str (char code, char subcode)
switch (code)
{
case BGP_NOTIFY_HEADER_ERR:
- return LOOKUP_DEF (bgp_notify_head_msg, subcode,
+ return lookup_msg (bgp_notify_head_msg, subcode,
"Unrecognized Error Subcode");
case BGP_NOTIFY_OPEN_ERR:
- return LOOKUP_DEF (bgp_notify_open_msg, subcode,
+ return lookup_msg (bgp_notify_open_msg, subcode,
"Unrecognized Error Subcode");
case BGP_NOTIFY_UPDATE_ERR:
- return LOOKUP_DEF (bgp_notify_update_msg, subcode,
+ return lookup_msg (bgp_notify_update_msg, subcode,
"Unrecognized Error Subcode");
case BGP_NOTIFY_HOLD_ERR:
break;
case BGP_NOTIFY_FSM_ERR:
break;
case BGP_NOTIFY_CEASE:
- return LOOKUP_DEF (bgp_notify_cease_msg, subcode,
+ return lookup_msg (bgp_notify_cease_msg, subcode,
"Unrecognized Error Subcode");
case BGP_NOTIFY_CAPABILITY_ERR:
- return LOOKUP_DEF (bgp_notify_capability_msg, subcode,
+ return lookup_msg (bgp_notify_capability_msg, subcode,
"Unrecognized Error Subcode");
}
return "";
diff --git a/bgpd/bgp_debug.h b/bgpd/bgp_debug.h
index 2912eb750..5ec2eaa7c 100644
--- a/bgpd/bgp_debug.h
+++ b/bgpd/bgp_debug.h
@@ -145,7 +145,6 @@ extern const char *bgp_notify_subcode_str(char, char);
extern void bgp_notify_print (struct peer *, struct bgp_notify *, const char *);
extern const struct message bgp_status_msg[];
-extern const int bgp_status_msg_max;
extern int bgp_debug_neighbor_events(struct peer *peer);
extern int bgp_debug_keepalive(struct peer *peer);
extern int bgp_debug_update(struct peer *peer, struct prefix *p,
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index a25e0be22..1fc425f8f 100644
--- a/bgpd/bgp_fsm.c
+++ b/bgpd/bgp_fsm.c
@@ -971,8 +971,8 @@ bgp_fsm_change_status (struct peer *peer, int status)
if (bgp_debug_neighbor_events(peer))
zlog_debug ("%s went from %s to %s",
peer->host,
- LOOKUP (bgp_status_msg, peer->ostatus),
- LOOKUP (bgp_status_msg, peer->status));
+ lookup_msg(bgp_status_msg, peer->ostatus, NULL),
+ lookup_msg(bgp_status_msg, peer->status, NULL));
}
/* Flush the event queue and ensure the peer is shut down */
@@ -1413,7 +1413,7 @@ static int
bgp_fsm_event_error (struct peer *peer)
{
zlog_err ("%s [FSM] unexpected packet received in state %s",
- peer->host, LOOKUP (bgp_status_msg, peer->status));
+ peer->host, lookup_msg(bgp_status_msg, peer->status, NULL));
return bgp_stop_with_notify (peer, BGP_NOTIFY_FSM_ERR, 0);
}
@@ -1599,7 +1599,7 @@ bgp_ignore (struct peer *peer)
{
zlog_err ("%s [FSM] Ignoring event %s in state %s, prior events %s, %s, fd %d",
peer->host, bgp_event_str[peer->cur_event],
- LOOKUP (bgp_status_msg, peer->status),
+ lookup_msg(bgp_status_msg, peer->status, NULL),
bgp_event_str[peer->last_event],
bgp_event_str[peer->last_major_event], peer->fd);
return 0;
@@ -1611,7 +1611,7 @@ bgp_fsm_exeption (struct peer *peer)
{
zlog_err ("%s [FSM] Unexpected event %s in state %s, prior events %s, %s, fd %d",
peer->host, bgp_event_str[peer->cur_event],
- LOOKUP (bgp_status_msg, peer->status),
+ lookup_msg(bgp_status_msg, peer->status, NULL),
bgp_event_str[peer->last_event],
bgp_event_str[peer->last_major_event], peer->fd);
return(bgp_stop (peer));
@@ -1837,8 +1837,8 @@ bgp_event_update (struct peer *peer, int event)
if (bgp_debug_neighbor_events(peer) && peer->status != next)
zlog_debug ("%s [FSM] %s (%s->%s), fd %d", peer->host,
bgp_event_str[event],
- LOOKUP (bgp_status_msg, peer->status),
- LOOKUP (bgp_status_msg, next), peer->fd);
+ lookup_msg(bgp_status_msg, peer->status, NULL),
+ lookup_msg(bgp_status_msg, next, NULL), peer->fd);
peer->last_event = peer->cur_event;
peer->cur_event = event;
@@ -1873,7 +1873,7 @@ bgp_event_update (struct peer *peer, int event)
zlog_err ("%s [FSM] Failure handling event %s in state %s, "
"prior events %s, %s, fd %d",
peer->host, bgp_event_str[peer->cur_event],
- LOOKUP (bgp_status_msg, peer->status),
+ lookup_msg(bgp_status_msg, peer->status, NULL),
bgp_event_str[peer->last_event],
bgp_event_str[peer->last_major_event], peer->fd);
bgp_stop (peer);
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
index cbec1a832..1f6e03e60 100644
--- a/bgpd/bgp_open.c
+++ b/bgpd/bgp_open.c
@@ -251,16 +251,16 @@ static const struct message orf_type_str[] =
{
{ ORF_TYPE_PREFIX, "Prefixlist" },
{ ORF_TYPE_PREFIX_OLD, "Prefixlist (old)" },
+ { 0 }
};
-static const int orf_type_str_max = array_size(orf_type_str);
static const struct message orf_mode_str[] =
{
{ ORF_MODE_RECEIVE, "Receive" },
{ ORF_MODE_SEND, "Send" },
{ ORF_MODE_BOTH, "Both" },
+ { 0 }
};
-static const int orf_mode_str_max = array_size(orf_mode_str);
static int
bgp_capability_orf_entry (struct peer *peer, struct capability_header *hdr)
@@ -366,8 +366,8 @@ bgp_capability_orf_entry (struct peer *peer, struct capability_header *hdr)
if (bgp_debug_neighbor_events(peer))
zlog_debug ("%s OPEN has %s ORF capability"
" as %s for afi/safi: %d/%d",
- peer->host, LOOKUP (orf_type_str, type),
- LOOKUP (orf_mode_str, mode),
+ peer->host, lookup_msg(orf_type_str, type, NULL),
+ lookup_msg(orf_mode_str, mode, NULL),
pkt_afi, pkt_safi);
if (hdr->code == CAPABILITY_CODE_ORF)
@@ -716,9 +716,9 @@ bgp_capability_hostname (struct peer *peer, struct capability_header *hdr)
{ CAPABILITY_CODE_DYNAMIC_OLD, "Dynamic (Old)" },
{ CAPABILITY_CODE_REFRESH_OLD, "Route Refresh (Old)" },
{ CAPABILITY_CODE_ORF_OLD, "ORF (Old)" },
- { CAPABILITY_CODE_FQDN, "FQDN" },
+ { CAPABILITY_CODE_FQDN, "FQDN" },
+ { 0 }
};
-static const int capcode_str_max = array_size(capcode_str);
/* Minimum sizes for length field of each cap (so not inc. the header) */
static const size_t cap_minsizes[] =
@@ -805,7 +805,7 @@ bgp_capability_parse (struct peer *peer, size_t length, int *mp_capability,
if (bgp_debug_neighbor_events(peer))
zlog_debug ("%s OPEN has %s capability (%u), length %u",
peer->host,
- LOOKUP (capcode_str, caphdr.code),
+ lookup_msg(capcode_str, caphdr.code, NULL),
caphdr.code, caphdr.length);
/* Length sanity check, type-specific, for known capabilities */
@@ -829,7 +829,7 @@ bgp_capability_parse (struct peer *peer, size_t length, int *mp_capability,
zlog_info ("%s %s Capability length error: got %u,"
" expected at least %u",
peer->host,
- LOOKUP (capcode_str, caphdr.code),
+ lookup_msg(capcode_str, caphdr.code, NULL),
caphdr.length,
(unsigned) cap_minsizes[caphdr.code]);
bgp_notify_send (peer, BGP_NOTIFY_OPEN_ERR, BGP_NOTIFY_OPEN_MALFORMED_ATTR);
@@ -841,7 +841,7 @@ bgp_capability_parse (struct peer *peer, size_t length, int *mp_capability,
zlog_info ("%s %s Capability length error: got %u,"
" expected a multiple of %u",
peer->host,
- LOOKUP (capcode_str, caphdr.code),
+ lookup_msg(capcode_str, caphdr.code, NULL),
caphdr.length,
(unsigned) cap_modsizes[caphdr.code]);
bgp_notify_send (peer, BGP_NOTIFY_OPEN_ERR,
@@ -940,7 +940,7 @@ bgp_capability_parse (struct peer *peer, size_t length, int *mp_capability,
{
if (stream_get_getp(s) > (start + caphdr.length))
zlog_warn ("%s Cap-parser for %s read past cap-length, %u!",
- peer->host, LOOKUP (capcode_str, caphdr.code),
+ peer->host, lookup_msg(capcode_str, caphdr.code, NULL),
caphdr.length);
stream_set_getp (s, start + caphdr.length);
}
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index da6bf5c3c..90aa68cfc 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -1382,7 +1382,7 @@ bgp_update_receive (struct peer *peer, bgp_size_t size)
if (peer->status != Established)
{
zlog_err ("%s [FSM] Update packet received under status %s",
- peer->host, LOOKUP (bgp_status_msg, peer->status));
+ peer->host, lookup_msg(bgp_status_msg, peer->status, NULL));
bgp_notify_send (peer, BGP_NOTIFY_FSM_ERR, 0);
return -1;
}
@@ -1749,7 +1749,7 @@ bgp_route_refresh_receive (struct peer *peer, bgp_size_t size)
if (peer->status != Established)
{
zlog_err ("%s [Error] Route refresh packet received under status %s",
- peer->host, LOOKUP (bgp_status_msg, peer->status));
+ peer->host, lookup_msg(bgp_status_msg, peer->status, NULL));
bgp_notify_send (peer, BGP_NOTIFY_FSM_ERR, 0);
return;
}
@@ -2078,7 +2078,7 @@ bgp_capability_receive (struct peer *peer, bgp_size_t size)
if (peer->status != Established)
{
zlog_err ("%s [Error] Dynamic capability packet received under status %s",
- peer->host, LOOKUP (bgp_status_msg, peer->status));
+ peer->host, lookup_msg(bgp_status_msg, peer->status, NULL));
bgp_notify_send (peer, BGP_NOTIFY_FSM_ERR, 0);
return -1;
}
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 702427a9c..88b434298 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -7207,7 +7207,7 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi,
else if (CHECK_FLAG (peer->sflags, PEER_STATUS_PREFIX_OVERFLOW))
json_object_string_add(json_peer, "state", "Idle (PfxCt)");
else
- json_object_string_add(json_peer, "state", LOOKUP(bgp_status_msg, peer->status));
+ json_object_string_add(json_peer, "state", lookup_msg(bgp_status_msg, peer->status, NULL));
if (peer->conf_if)
json_object_string_add(json_peer, "idType", "interface");
@@ -7259,7 +7259,7 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi,
else if (CHECK_FLAG (peer->sflags, PEER_STATUS_PREFIX_OVERFLOW))
vty_out (vty, " Idle (PfxCt)");
else
- vty_out (vty, " %12s", LOOKUP(bgp_status_msg, peer->status));
+ vty_out (vty, " %12s", lookup_msg(bgp_status_msg, peer->status, NULL));
}
vty_out (vty, "%s", VTY_NEWLINE);
}
@@ -8249,7 +8249,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
json_object_boolean_true_add(json_neigh, "nbrCommonAdmin");
/* Status. */
- json_object_string_add(json_neigh, "bgpState", LOOKUP (bgp_status_msg, p->status));
+ json_object_string_add(json_neigh, "bgpState", lookup_msg(bgp_status_msg, p->status, NULL));
if (p->status == Established)
{
@@ -8322,7 +8322,7 @@ bgp_show_peer (struct vty *vty, struct peer *p, u_char use_json, json_object *js
vty_out (vty, " Neighbor under common administration%s", VTY_NEWLINE);
/* Status. */
- vty_out (vty, " BGP state = %s", LOOKUP (bgp_status_msg, p->status));
+ vty_out (vty, " BGP state = %s", lookup_msg(bgp_status_msg, p->status, NULL));
if (p->status == Established)
vty_out (vty, ", up for %8s", peer_uptime (p->uptime, timebuf, BGP_UPTIME_LEN, 0, NULL));
@@ -10027,7 +10027,7 @@ bgp_show_one_peer_group (struct vty *vty, struct peer_group *group)
else if (CHECK_FLAG (peer->sflags, PEER_STATUS_PREFIX_OVERFLOW))
peer_status = "Idle (PfxCt)";
else
- peer_status = LOOKUP(bgp_status_msg, peer->status);
+ peer_status = lookup_msg(bgp_status_msg, peer->status, NULL);
dynamic = peer_dynamic_neighbor(peer);
vty_out (vty, " %s %s %s %s",
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index 84dcb7e1d..78f04728d 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -991,7 +991,6 @@ struct bgp_nlri
#define BGP_NOTIFY_FSM_ERR 5
#define BGP_NOTIFY_CEASE 6
#define BGP_NOTIFY_CAPABILITY_ERR 7
-#define BGP_NOTIFY_MAX 8
#define BGP_NOTIFY_SUBCODE_UNSPECIFIC 0
@@ -999,7 +998,6 @@ struct bgp_nlri
#define BGP_NOTIFY_HEADER_NOT_SYNC 1
#define BGP_NOTIFY_HEADER_BAD_MESLEN 2
#define BGP_NOTIFY_HEADER_BAD_MESTYPE 3
-#define BGP_NOTIFY_HEADER_MAX 4
/* BGP_NOTIFY_OPEN_ERR sub codes. */
#define BGP_NOTIFY_OPEN_MALFORMED_ATTR 0
@@ -1010,7 +1008,6 @@ struct bgp_nlri
#define BGP_NOTIFY_OPEN_AUTH_FAILURE 5
#define BGP_NOTIFY_OPEN_UNACEP_HOLDTIME 6
#define BGP_NOTIFY_OPEN_UNSUP_CAPBL 7
-#define BGP_NOTIFY_OPEN_MAX 8
/* BGP_NOTIFY_UPDATE_ERR sub codes. */
#define BGP_NOTIFY_UPDATE_MAL_ATTR 1
@@ -1024,7 +1021,6 @@ struct bgp_nlri
#define BGP_NOTIFY_UPDATE_OPT_ATTR_ERR 9
#define BGP_NOTIFY_UPDATE_INVAL_NETWORK 10
#define BGP_NOTIFY_UPDATE_MAL_AS_PATH 11
-#define BGP_NOTIFY_UPDATE_MAX 12
/* BGP_NOTIFY_CEASE sub codes (RFC 4486). */
#define BGP_NOTIFY_CEASE_MAX_PREFIX 1
@@ -1035,13 +1031,11 @@ struct bgp_nlri
#define BGP_NOTIFY_CEASE_CONFIG_CHANGE 6
#define BGP_NOTIFY_CEASE_COLLISION_RESOLUTION 7
#define BGP_NOTIFY_CEASE_OUT_OF_RESOURCE 8
-#define BGP_NOTIFY_CEASE_MAX 9
/* BGP_NOTIFY_CAPABILITY_ERR sub codes (draft-ietf-idr-dynamic-cap-02). */
#define BGP_NOTIFY_CAPABILITY_INVALID_ACTION 1
#define BGP_NOTIFY_CAPABILITY_INVALID_LENGTH 2
#define BGP_NOTIFY_CAPABILITY_MALFORMED_CODE 3
-#define BGP_NOTIFY_CAPABILITY_MAX 4
/* BGP finite state machine status. */
#define Idle 1
diff --git a/bgpd/rfapi/rfapi_import.c b/bgpd/rfapi/rfapi_import.c
index cefb9ef85..27f42cf02 100644
--- a/bgpd/rfapi/rfapi_import.c
+++ b/bgpd/rfapi/rfapi_import.c
@@ -3242,7 +3242,7 @@ rfapiBgpInfoFilteredImportEncap (
rn = route_node_lookup (rt, p);
#if DEBUG_ENCAP_MONITOR
- vnc_zlog_debug_verbose ("%s: initial encap lookup (it=%p) rn=%p",
+ vnc_zlog_debug_verbose ("%s: initial encap lookup(it=%p) rn=%p",
__func__, import_table, rn);
#endif