diff options
-rw-r--r-- | babeld/babel_errors.c | 2 | ||||
-rw-r--r-- | bgpd/bgp_errors.c | 2 | ||||
-rw-r--r-- | eigrpd/eigrp_errors.c | 2 | ||||
-rw-r--r-- | isisd/isis_errors.c | 2 | ||||
-rw-r--r-- | lib/lib_errors.c | 1 | ||||
-rw-r--r-- | lib/libfrr.c | 1 | ||||
-rw-r--r-- | nhrpd/nhrp_errors.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_errors.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_main.c | 3 | ||||
-rw-r--r-- | pimd/pim_errors.c | 2 | ||||
-rw-r--r-- | ripd/rip_errors.c | 2 | ||||
-rw-r--r-- | watchfrr/watchfrr_errors.c | 2 | ||||
-rw-r--r-- | zebra/main.c | 3 | ||||
-rw-r--r-- | zebra/zebra_errors.c | 5 | ||||
-rw-r--r-- | zebra/zebra_errors.h | 2 |
15 files changed, 11 insertions, 22 deletions
diff --git a/babeld/babel_errors.c b/babeld/babel_errors.c index ffcc3867f..ec0ff5192 100644 --- a/babeld/babel_errors.c +++ b/babeld/babel_errors.c @@ -57,7 +57,5 @@ static struct ferr_ref ferr_babel_err[] = { void babel_error_init(void) { - ferr_ref_init(); - ferr_ref_add(ferr_babel_err); } diff --git a/bgpd/bgp_errors.c b/bgpd/bgp_errors.c index 5535a2a8a..c86178d99 100644 --- a/bgpd/bgp_errors.c +++ b/bgpd/bgp_errors.c @@ -302,7 +302,5 @@ static struct ferr_ref ferr_bgp_err[] = { void bgp_error_init(void) { - ferr_ref_init(); - ferr_ref_add(ferr_bgp_err); } diff --git a/eigrpd/eigrp_errors.c b/eigrpd/eigrp_errors.c index 5732fc39c..4e6337a7b 100644 --- a/eigrpd/eigrp_errors.c +++ b/eigrpd/eigrp_errors.c @@ -45,7 +45,5 @@ static struct ferr_ref ferr_eigrp_err[] = { void eigrp_error_init(void) { - ferr_ref_init(); - ferr_ref_add(ferr_eigrp_err); } diff --git a/isisd/isis_errors.c b/isisd/isis_errors.c index d7425153a..3f69a10ca 100644 --- a/isisd/isis_errors.c +++ b/isisd/isis_errors.c @@ -45,7 +45,5 @@ static struct ferr_ref ferr_isis_err[] = { void isis_error_init(void) { - ferr_ref_init(); - ferr_ref_add(ferr_isis_err); } diff --git a/lib/lib_errors.c b/lib/lib_errors.c index e08b03f17..c659a7aae 100644 --- a/lib/lib_errors.c +++ b/lib/lib_errors.c @@ -114,6 +114,5 @@ static struct ferr_ref ferr_lib_err[] = { void lib_error_init(void) { - ferr_ref_init(); ferr_ref_add(ferr_lib_err); } diff --git a/lib/libfrr.c b/lib/libfrr.c index 05b001b6d..154f19eae 100644 --- a/lib/libfrr.c +++ b/lib/libfrr.c @@ -599,6 +599,7 @@ struct thread_master *frr_init(void) vty_init(master); memory_init(); + ferr_ref_init(); lib_error_init(); return master; diff --git a/nhrpd/nhrp_errors.c b/nhrpd/nhrp_errors.c index 71ec21113..3c0d4c3e5 100644 --- a/nhrpd/nhrp_errors.c +++ b/nhrpd/nhrp_errors.c @@ -45,7 +45,5 @@ static struct ferr_ref ferr_nhrp_err[] = { void nhrp_error_init(void) { - ferr_ref_init(); - ferr_ref_add(ferr_nhrp_err); } diff --git a/ospfd/ospf_errors.c b/ospfd/ospf_errors.c index f4ae731a9..244aa2695 100644 --- a/ospfd/ospf_errors.c +++ b/ospfd/ospf_errors.c @@ -80,7 +80,5 @@ static struct ferr_ref ferr_ospf_err[] = { void ospf_error_init(void) { - ferr_ref_init(); - ferr_ref_add(ferr_ospf_err); } diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index 1a25e27d7..c3f919ef1 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -207,6 +207,9 @@ int main(int argc, char **argv) ospf_route_map_init(); ospf_opaque_init(); + /* OSPF errors init */ + ospf_error_init(); + /* Need to initialize the default ospf structure, so the interface mode commands can be duly processed if they are received before 'router ospf', diff --git a/pimd/pim_errors.c b/pimd/pim_errors.c index 15f0345f0..81e2bd556 100644 --- a/pimd/pim_errors.c +++ b/pimd/pim_errors.c @@ -45,7 +45,5 @@ static struct ferr_ref ferr_pim_err[] = { void pim_error_init(void) { - ferr_ref_init(); - ferr_ref_add(ferr_pim_err); } diff --git a/ripd/rip_errors.c b/ripd/rip_errors.c index 4a2a2bd5a..133d80852 100644 --- a/ripd/rip_errors.c +++ b/ripd/rip_errors.c @@ -37,7 +37,5 @@ static struct ferr_ref ferr_rip_err[] = { void rip_error_init(void) { - ferr_ref_init(); - ferr_ref_add(ferr_rip_err); } diff --git a/watchfrr/watchfrr_errors.c b/watchfrr/watchfrr_errors.c index 9a4842a5d..494132e52 100644 --- a/watchfrr/watchfrr_errors.c +++ b/watchfrr/watchfrr_errors.c @@ -39,7 +39,5 @@ static struct ferr_ref ferr_watchfrr_err[] = { void watchfrr_error_init(void) { - ferr_ref_init(); - ferr_ref_add(ferr_watchfrr_err); } diff --git a/zebra/main.c b/zebra/main.c index 719a6ca59..9453e54b6 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -413,6 +413,9 @@ int main(int argc, char **argv) /* RNH init */ zebra_rnh_init(); + + /* Error init */ + zebra_error_init(); #if defined(HANDLE_ZAPI_FUZZING) if (zapi_fuzzing) { diff --git a/zebra/zebra_errors.c b/zebra/zebra_errors.c index f657bdcdc..39e3939bb 100644 --- a/zebra/zebra_errors.c +++ b/zebra/zebra_errors.c @@ -265,13 +265,14 @@ static struct ferr_ref ferr_zebra_err[] = { .description = "Zebra attempted to add a VNI hash to an interface and failed", .suggestion = "Notify a developer.", }, + { + .code = END_FERR, + } }; /* clang-format on */ void zebra_error_init(void) { - ferr_ref_init(); - ferr_ref_add(ferr_zebra_err); } diff --git a/zebra/zebra_errors.h b/zebra/zebra_errors.h index 66771a33d..f5f4894ec 100644 --- a/zebra/zebra_errors.h +++ b/zebra/zebra_errors.h @@ -24,7 +24,7 @@ #include "lib/ferr.h" enum zebra_ferr_refs { - ZEBRA_ERR_LM_RESPONSE, + ZEBRA_ERR_LM_RESPONSE = ZEBRA_FERR_START, ZEBRA_ERR_LM_NO_SUCH_CLIENT, ZEBRA_ERR_LM_RELAY_FAILED, ZEBRA_ERR_LM_NO_SOCKET, |