]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: convert bgp_nht.c to use flog_warn
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 16 Aug 2018 13:15:43 +0000 (09:15 -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_nht.c

index 7d04c631047bbd4cec16174feecbd9f2983b175d..70cdf53bd42abfb9180c04badd3691c5da4385ce 100644 (file)
@@ -151,6 +151,12 @@ static struct log_ref ferr_bgp_warn[] = {
                .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 = BGP_WARN_ZEBRA_SEND,
+               .title = "BGP has attempted to send data to zebra and has failed to do so",
+               .description = "BGP has attempted to send data to zebra but has been unable to do so",
+               .suggestion = "Gather log data, open an Issue and restart FRR"
+       },
        {
                .code = END_FERR,
        }
index a9f20f140785ee2846138268ccc1427fbab70339..6accd442307736b9e31bbffcd1965654330eefc3 100644 (file)
@@ -93,6 +93,7 @@ enum bgp_log_refs {
        BGP_WARN_EVPN_VPN_VNI,
        BGP_WARN_EVPN_ESI,
        BGP_WARN_INVALID_LABEL_STACK,
+       BGP_WARN_ZEBRA_SEND,
 };
 
 extern void bgp_error_init(void);
index 0c0c07995013dbf72cc9bc83e43ce29e31137dea..cf055fd438f9f3c277c68d696f4caecd4f09809d 100644 (file)
@@ -592,7 +592,8 @@ static void sendmsg_zebra_rnh(struct bgp_nexthop_cache *bnc, int command)
                               bnc->bgp->vrf_id);
        /* TBD: handle the failure */
        if (ret < 0)
-               zlog_warn("sendmsg_nexthop: zclient_send_message() failed");
+               flog_warn(BGP_WARN_ZEBRA_SEND,
+                         "sendmsg_nexthop: zclient_send_message() failed");
 
        if ((command == ZEBRA_NEXTHOP_REGISTER)
            || (command == ZEBRA_IMPORT_ROUTE_REGISTER))