diff options
Diffstat (limited to 'bgpd/bgp_open.c')
| -rw-r--r-- | bgpd/bgp_open.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 2a32f02f42..62b412af0c 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -255,7 +255,7 @@ static int bgp_capability_mp(struct peer *peer, struct capability_header *hdr) /* Verify length is 4 */ if (hdr->length != 4) { flog_warn( - BGP_WARN_CAPABILITY_INVALID_LENGTH, + EC_BGP_CAPABILITY_INVALID_LENGTH, "MP Cap: Received invalid length %d, non-multiple of 4", hdr->length); return -1; @@ -451,7 +451,7 @@ static int bgp_capability_restart(struct peer *peer, /* Verify length is a multiple of 4 */ if ((caphdr->length - 2) % 4) { flog_warn( - BGP_WARN_CAPABILITY_INVALID_LENGTH, + EC_BGP_CAPABILITY_INVALID_LENGTH, "Restart Cap: Received invalid length %d, non-multiple of 4", caphdr->length); return -1; @@ -523,9 +523,9 @@ static as_t bgp_capability_as4(struct peer *peer, struct capability_header *hdr) SET_FLAG(peer->cap, PEER_CAP_AS4_RCV); if (hdr->length != CAPABILITY_CODE_AS4_LEN) { - flog_err(BGP_ERR_PKT_OPEN, - "%s AS4 capability has incorrect data length %d", - peer->host, hdr->length); + flog_err(EC_BGP_PKT_OPEN, + "%s AS4 capability has incorrect data length %d", + peer->host, hdr->length); return 0; } @@ -549,7 +549,7 @@ static int bgp_capability_addpath(struct peer *peer, /* Verify length is a multiple of 4 */ if (hdr->length % 4) { flog_warn( - BGP_WARN_CAPABILITY_INVALID_LENGTH, + EC_BGP_CAPABILITY_INVALID_LENGTH, "Add Path: Received invalid length %d, non-multiple of 4", hdr->length); return -1; @@ -608,7 +608,7 @@ static int bgp_capability_enhe(struct peer *peer, struct capability_header *hdr) /* Verify length is a multiple of 4 */ if (hdr->length % 6) { flog_warn( - BGP_WARN_CAPABILITY_INVALID_LENGTH, + EC_BGP_CAPABILITY_INVALID_LENGTH, "Extended NH: Received invalid length %d, non-multiple of 6", hdr->length); return -1; @@ -651,7 +651,7 @@ static int bgp_capability_enhe(struct peer *peer, struct capability_header *hdr) || !(safi == SAFI_UNICAST || safi == SAFI_LABELED_UNICAST)) { flog_warn( - BGP_WARN_CAPABILITY_INVALID_DATA, + EC_BGP_CAPABILITY_INVALID_DATA, "%s Unexpected afi/safi/next-hop afi: %u/%u/%u " "in Extended Next-hop capability, ignoring", peer->host, pkt_afi, pkt_safi, pkt_nh_afi); @@ -683,7 +683,7 @@ static int bgp_capability_hostname(struct peer *peer, len = stream_getc(s); if (stream_get_getp(s) + len > end) { flog_warn( - BGP_WARN_CAPABILITY_INVALID_DATA, + EC_BGP_CAPABILITY_INVALID_DATA, "%s: Received malformed hostname capability from peer %s", __FUNCTION__, peer->host); return -1; @@ -714,7 +714,7 @@ static int bgp_capability_hostname(struct peer *peer, if (stream_get_getp(s) + 1 > end) { flog_warn( - BGP_WARN_CAPABILITY_INVALID_DATA, + EC_BGP_CAPABILITY_INVALID_DATA, "%s: Received invalid domain name len (hostname capability) from peer %s", __FUNCTION__, peer->host); return -1; @@ -723,7 +723,7 @@ static int bgp_capability_hostname(struct peer *peer, len = stream_getc(s); if (stream_get_getp(s) + len > end) { flog_warn( - BGP_WARN_CAPABILITY_INVALID_DATA, + EC_BGP_CAPABILITY_INVALID_DATA, "%s: Received runt domain name (hostname capability) from peer %s", __FUNCTION__, peer->host); return -1; @@ -960,12 +960,12 @@ static int bgp_capability_parse(struct peer *peer, size_t length, specific capabilities. It seems reasonable for now... */ - flog_warn(BGP_WARN_CAPABILITY_VENDOR, + flog_warn(EC_BGP_CAPABILITY_VENDOR, "%s Vendor specific capability %d", peer->host, caphdr.code); } else { flog_warn( - BGP_WARN_CAPABILITY_UNKNOWN, + EC_BGP_CAPABILITY_UNKNOWN, "%s unrecognized capability code: %d - ignored", peer->host, caphdr.code); memcpy(*error, sp, caphdr.length + 2); @@ -981,7 +981,7 @@ static int bgp_capability_parse(struct peer *peer, size_t length, if (stream_get_getp(s) != (start + caphdr.length)) { if (stream_get_getp(s) > (start + caphdr.length)) flog_warn( - BGP_WARN_CAPABILITY_INVALID_LENGTH, + EC_BGP_CAPABILITY_INVALID_LENGTH, "%s Cap-parser for %s read past cap-length, %u!", peer->host, lookup_msg(capcode_str, caphdr.code, @@ -1197,10 +1197,10 @@ int bgp_open_option_parse(struct peer *peer, uint8_t length, int *mp_capability) && !peer->afc_nego[AFI_IP6][SAFI_ENCAP] && !peer->afc_nego[AFI_IP6][SAFI_FLOWSPEC] && !peer->afc_nego[AFI_L2VPN][SAFI_EVPN]) { - flog_err(BGP_ERR_PKT_OPEN, - "%s [Error] Configured AFI/SAFIs do not " - "overlap with received MP capabilities", - peer->host); + flog_err(EC_BGP_PKT_OPEN, + "%s [Error] Configured AFI/SAFIs do not " + "overlap with received MP capabilities", + peer->host); if (error != error_data) bgp_notify_send_with_data( |
