From: Donald Sharp Date: Thu, 16 Aug 2018 13:12:03 +0000 (-0400) Subject: bgpd: Modify bgp_label to use flog_warn X-Git-Tag: frr-7.1-dev~371^2~44 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=01c4f23c0edccfa716228c972ca615eacd602387;p=mirror%2Ffrr.git bgpd: Modify bgp_label to use flog_warn Signed-off-by: Donald Sharp --- diff --git a/bgpd/bgp_errors.c b/bgpd/bgp_errors.c index afe669ed1e..7d04c63104 100644 --- a/bgpd/bgp_errors.c +++ b/bgpd/bgp_errors.c @@ -145,6 +145,12 @@ static struct log_ref ferr_bgp_warn[] = { .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 = BGP_WARN_INVALID_LABEL_STACK, + .title = "BGP has received a label stack in a NLRI that does not have the BOS marked", + .description = "BGP when it receives a NLRI with a label stack should have the BOS marked, this received packet does not have this", + .suggestion = "Gather log information from here and remote peer and open an Issue", + }, { .code = END_FERR, } diff --git a/bgpd/bgp_errors.h b/bgpd/bgp_errors.h index 95202cdb04..a9f20f1407 100644 --- a/bgpd/bgp_errors.h +++ b/bgpd/bgp_errors.h @@ -92,6 +92,7 @@ enum bgp_log_refs { BGP_WARN_EVPN_PMSI_PRESENT, BGP_WARN_EVPN_VPN_VNI, BGP_WARN_EVPN_ESI, + BGP_WARN_INVALID_LABEL_STACK, }; extern void bgp_error_init(void); diff --git a/bgpd/bgp_label.c b/bgpd/bgp_label.c index 633e589333..c32df275a3 100644 --- a/bgpd/bgp_label.c +++ b/bgpd/bgp_label.c @@ -187,11 +187,12 @@ static int bgp_nlri_get_labels(struct peer *peer, uint8_t *pnt, uint8_t plen, /* If we RX multiple labels we will end up keeping only the last * one. We do not yet support a label stack greater than 1. */ if (label_depth > 1) - zlog_warn("%s rcvd UPDATE with label stack %d deep", peer->host, + zlog_info("%s rcvd UPDATE with label stack %d deep", peer->host, label_depth); if (!(bgp_is_withdraw_label(label) || label_bos(label))) - zlog_warn( + flog_warn( + BGP_WARN_INVALID_LABEL_STACK, "%s rcvd UPDATE with invalid label stack - no bottom of stack", peer->host);