bgpd: convert bgp_nht.c to use flog_warn

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2018-08-16 09:15:43 -04:00 committed by Quentin Young
parent 01c4f23c0e
commit f162a5b977
3 changed files with 9 additions and 1 deletions

View 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,
}

View 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);

View 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))