diff --git a/bgpd/Makefile.am b/bgpd/Makefile.am index 2f19bbbd73..b6b125f752 100644 --- a/bgpd/Makefile.am +++ b/bgpd/Makefile.am @@ -85,7 +85,7 @@ libbgp_a_SOURCES = \ bgp_encap_tlv.c $(BGP_VNC_RFAPI_SRC) bgp_attr_evpn.c \ bgp_evpn.c bgp_evpn_vty.c bgp_vpn.c bgp_label.c bgp_rd.c \ bgp_keepalives.c bgp_io.c bgp_flowspec.c bgp_flowspec_util.c \ - bgp_flowspec_vty.c bgp_labelpool.c bgp_pbr.c + bgp_flowspec_vty.c bgp_labelpool.c bgp_pbr.c bgp_errors.c noinst_HEADERS = \ bgp_memory.h \ @@ -99,7 +99,7 @@ noinst_HEADERS = \ $(BGP_VNC_RFAPI_HD) bgp_attr_evpn.h bgp_evpn.h bgp_evpn_vty.h \ bgp_vpn.h bgp_label.h bgp_rd.h bgp_evpn_private.h bgp_keepalives.h \ bgp_io.h bgp_flowspec.h bgp_flowspec_private.h bgp_flowspec_util.h \ - bgp_labelpool.h bgp_pbr.h + bgp_labelpool.h bgp_pbr.h bgp_errors.h bgpd_SOURCES = bgp_main.c bgpd_LDADD = libbgp.a $(BGP_VNC_RFP_LIB) ../lib/libfrr.la @LIBCAP@ @LIBM@ diff --git a/bgpd/bgp_errors.c b/bgpd/bgp_errors.c index c69035cac9..71b19238f6 100644 --- a/bgpd/bgp_errors.c +++ b/bgpd/bgp_errors.c @@ -21,7 +21,7 @@ #include #include -static struct ferr_ref ferr_lib_err[] = { +static struct ferr_ref ferr_bgp_err[] = { { .code = BGP_ERR_ATTR_FLAG, .title = "BGP attribute flag is incorrect", @@ -64,12 +64,6 @@ static struct ferr_ref ferr_lib_err[] = { .description = "BGP update has invalid length for PMSI tunnel", .suggestion = "Determine the soure of the update and determine why the PMSI tunnel\nattribute length has been set incorrectly" }, - { - .code = BGP_ERR_NH_SEND_LEN, - .title = "BGP nethop length is invalid sending to peer", - .description = "BGP update has invalid length for nexthop sending to peer", - .suggestion = "Determine why the nexthop length has been set incorrectly" - }, { .code = BGP_ERR_PEER_GROUP, .title = "BGP peergroup operated on in error", @@ -227,7 +221,7 @@ static struct ferr_ref ferr_lib_err[] = { }, { .code = BGP_ERR_VNI, - title = "BGP VNI creation issue", + .title = "BGP VNI creation issue", .description = "BGP could not create a new VNI", .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting" }, @@ -297,13 +291,12 @@ static struct ferr_ref ferr_lib_err[] = { .description = "BGP configuration has AS and process name mismatch", .suggestion = "Correct the configuration so that the BGP AS number and instance\nname are consistent" }, -{ - .code = END_FERR, -} -} -; + { + .code = END_FERR, + } +}; -void BGP_error_init(void) +void bgp_error_init(void) { ferr_ref_init(); diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 7cc46e020d..f7cb2dae38 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -60,6 +60,7 @@ #include "bgpd/bgp_packet.h" #include "bgpd/bgp_keepalives.h" #include "bgpd/bgp_network.h" +#include "bgpd/bgp_errors.h" #ifdef ENABLE_BGP_VNC #include "bgpd/rfapi/rfapi_backend.h" @@ -419,6 +420,7 @@ int main(int argc, char **argv) if (no_fib_flag) bgp_option_set(BGP_OPT_NO_FIB); + bgp_error_init(); /* Initializations. */ bgp_vrf_init();