]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Modify bgp_label to use flog_warn
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 16 Aug 2018 13:12:03 +0000 (09:12 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 6 Sep 2018 20:50:58 +0000 (20:50 +0000)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_errors.c
bgpd/bgp_errors.h
bgpd/bgp_label.c

index afe669ed1e6bbe69574ffced71dc5f7e4f86bbae..7d04c631047bbd4cec16174feecbd9f2983b175d 100644 (file)
@@ -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,
        }
index 95202cdb04d9fcd8fe00dd6c419bec434ffeef1c..a9f20f140785ee2846138268ccc1427fbab70339 100644 (file)
@@ -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);
index 633e5893339f980d3b5b9e4bd65c957f30b5b81a..c32df275a3b89cc91122844b69069297de66ecee 100644 (file)
@@ -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);