diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-08-16 14:58:01 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-09-06 22:50:58 +0200 |
commit | 286425133ed819d34aac43a99bd0d181dbd28a82 (patch) | |
tree | c136700d6e61d5844047116b69a822a231f1104e /bgpd | |
parent | bgpd: Convert bgp_network.c to use flog_warn (diff) | |
download | frr-286425133ed819d34aac43a99bd0d181dbd28a82.tar.xz frr-286425133ed819d34aac43a99bd0d181dbd28a82.zip |
bgpd: Convert bgp_evpn.c to use flow_warn
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_errors.c | 18 | ||||
-rw-r--r-- | bgpd/bgp_errors.h | 3 | ||||
-rw-r--r-- | bgpd/bgp_evpn.c | 21 |
3 files changed, 33 insertions, 9 deletions
diff --git a/bgpd/bgp_errors.c b/bgpd/bgp_errors.c index b9f814af2..afe669ed1 100644 --- a/bgpd/bgp_errors.c +++ b/bgpd/bgp_errors.c @@ -128,6 +128,24 @@ static struct log_ref ferr_bgp_warn[] = { .suggestion = "Please collect log files and open Issue", }, { + .code = BGP_WARN_EVPN_PMSI_PRESENT, + .title = "BGP Received a EVPN NLRI with PMSI included", + .description = "BGP has received a type-3 NLRI with PMSI information. At this time FRR is not capable of properly handling this NLRI type", + .suggestion = "Setup peer to not send this type of data to FRR" + }, + { + .code = BGP_WARN_EVPN_VPN_VNI, + .title = "BGP has received a local macip and cannot properly handle it", + .description = "BGP has received a local macip from zebra and has no way to properly handle the macip because the vni is not setup properly", + .suggestion = "Ensure proper setup of BGP EVPN", + }, + { + .code = BGP_WARN_EVPN_ESI, + .title = "BGP has received a local ESI for deletion", + .description = "BGP has received a local ESI for deletion but when attempting to find the stored data internally was unable to find the information for deletion", + .suggestion = "Gather logging and open an Issue", + }, + { .code = END_FERR, } }; diff --git a/bgpd/bgp_errors.h b/bgpd/bgp_errors.h index c47a60008..95202cdb0 100644 --- a/bgpd/bgp_errors.h +++ b/bgpd/bgp_errors.h @@ -89,6 +89,9 @@ enum bgp_log_refs { BGP_WARN_UNRECOGNIZED_CAPABILITY, BGP_WARN_NO_TCP_MD5, BGP_WARN_NO_SOCKOPT_MARK, + BGP_WARN_EVPN_PMSI_PRESENT, + BGP_WARN_EVPN_VPN_VNI, + BGP_WARN_EVPN_ESI, }; extern void bgp_error_init(void); diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index a104a2e16..713179ab9 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -3683,7 +3683,8 @@ static int process_type3_route(struct peer *peer, afi_t afi, safi_t safi, if (attr && (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_PMSI_TUNNEL))) { if (attr->pmsi_tnl_type != PMSI_TNLTYPE_INGR_REPL) { - zlog_warn("%u:%s - Rx EVPN Type-3 NLRI with unsupported PTA %d", + flog_warn(BGP_WARN_EVPN_PMSI_PRESENT, + "%u:%s - Rx EVPN Type-3 NLRI with unsupported PTA %d", peer->bgp->vrf_id, peer->host, attr->pmsi_tnl_type); } @@ -5162,7 +5163,8 @@ int bgp_evpn_local_macip_del(struct bgp *bgp, vni_t vni, struct ethaddr *mac, /* Lookup VNI hash - should exist. */ vpn = bgp_evpn_lookup_vni(bgp, vni); if (!vpn || !is_vni_live(vpn)) { - zlog_warn("%u: VNI hash entry for VNI %u %s at MACIP DEL", + flog_warn(BGP_WARN_EVPN_VPN_VNI, + "%u: VNI hash entry for VNI %u %s at MACIP DEL", bgp->vrf_id, vni, vpn ? "not live" : "not found"); return -1; } @@ -5186,7 +5188,8 @@ int bgp_evpn_local_macip_add(struct bgp *bgp, vni_t vni, struct ethaddr *mac, /* Lookup VNI hash - should exist. */ vpn = bgp_evpn_lookup_vni(bgp, vni); if (!vpn || !is_vni_live(vpn)) { - zlog_warn("%u: VNI hash entry for VNI %u %s at MACIP ADD", + flog_warn(BGP_WARN_EVPN_VPN_VNI, + "%u: VNI hash entry for VNI %u %s at MACIP ADD", bgp->vrf_id, vni, vpn ? "not live" : "not found"); return -1; } @@ -5398,9 +5401,9 @@ int bgp_evpn_local_vni_del(struct bgp *bgp, vni_t vni) vpn = bgp_evpn_lookup_vni(bgp, vni); if (!vpn) { if (bgp_debug_zebra(NULL)) - zlog_warn( - "%u: VNI hash entry for VNI %u not found at DEL", - bgp->vrf_id, vni); + flog_warn(BGP_WARN_EVPN_VPN_VNI, + "%u: VNI hash entry for VNI %u not found at DEL", + bgp->vrf_id, vni); return 0; } @@ -5529,9 +5532,9 @@ int bgp_evpn_local_es_del(struct bgp *bgp, /* Lookup ESI hash - should exist. */ es = bgp_evpn_lookup_es(bgp, esi); if (!es) { - zlog_warn("%u: ESI hash entry for ESI %s at Local ES DEL", - bgp->vrf_id, - esi_to_str(esi, buf, sizeof(buf))); + flog_warn(BGP_WARN_EVPN_ESI, + "%u: ESI hash entry for ESI %s at Local ES DEL", + bgp->vrf_id, esi_to_str(esi, buf, sizeof(buf))); return -1; } |