diff options
-rw-r--r-- | ospfd/ospf_apiserver.c | 6 | ||||
-rw-r--r-- | ospfd/ospf_errors.c | 8 | ||||
-rw-r--r-- | ospfd/ospf_errors.h | 1 | ||||
-rw-r--r-- | ospfd/ospf_ext.c | 12 | ||||
-rw-r--r-- | ospfd/ospf_lsa.c | 22 | ||||
-rw-r--r-- | ospfd/ospf_ri.c | 6 | ||||
-rw-r--r-- | ospfd/ospf_te.c | 6 |
7 files changed, 37 insertions, 24 deletions
diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c index e37f87db9..4ae57793d 100644 --- a/ospfd/ospf_apiserver.c +++ b/ospfd/ospf_apiserver.c @@ -1664,7 +1664,8 @@ int ospf_apiserver_originate1(struct ospf_lsa *lsa) /* Install this LSA into LSDB. */ if (ospf_lsa_install(ospf, lsa->oi, lsa) == NULL) { - zlog_warn("ospf_apiserver_originate1: ospf_lsa_install failed"); + flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE, + "ospf_apiserver_originate1: ospf_lsa_install failed"); return -1; } @@ -1775,7 +1776,8 @@ struct ospf_lsa *ospf_apiserver_lsa_refresher(struct ospf_lsa *lsa) /* Install LSA into LSDB. */ if (ospf_lsa_install(ospf, new->oi, new) == NULL) { - zlog_warn( + flog_warn( + OSPF_WARN_LSA_INSTALL_FAILURE, "ospf_apiserver_lsa_refresher: ospf_lsa_install failed"); ospf_lsa_unlock(&new); goto out; diff --git a/ospfd/ospf_errors.c b/ospfd/ospf_errors.c index 2e40df0a8..a597b075d 100644 --- a/ospfd/ospf_errors.c +++ b/ospfd/ospf_errors.c @@ -71,7 +71,13 @@ static struct log_ref ferr_ospf_warn[] = { .code = OSPF_WARN_TE_UNEXPECTED, .title = "OSPF has received TE information that it was not expecting", .description = "OSPF has received TE information that it was not expecting during normal processing of data", - .suggestion = "Gthat log data from this machine and it's peer and open an Issue", + .suggestion = "Gather log data from this machine and it's peer and open an Issue", + }, + { + .code = OSPF_WARN_LSA_INSTALL_FAILURE, + .title = "OSPF was unable to save the LSA into it's database", + .description = "During processing of a new lsa and attempting to save the lsa into the OSPF database, this process failed.", + .suggestion = "Gather log data from this machine and open an Issue", }, { .code = END_FERR, diff --git a/ospfd/ospf_errors.h b/ospfd/ospf_errors.h index c42d7552d..721d8e08d 100644 --- a/ospfd/ospf_errors.h +++ b/ospfd/ospf_errors.h @@ -40,6 +40,7 @@ enum ospf_log_refs { OSPF_WARN_LSA, OSPF_WARN_OPAQUE_REGISTRATION, OSPF_WARN_TE_UNEXPECTED, + OSPF_WARN_LSA_INSTALL_FAILURE, }; extern void ospf_error_init(void); diff --git a/ospfd/ospf_ext.c b/ospfd/ospf_ext.c index 8ddf7db9d..280c9b786 100644 --- a/ospfd/ospf_ext.c +++ b/ospfd/ospf_ext.c @@ -1068,7 +1068,8 @@ static int ospf_ext_pref_lsa_originate1(struct ospf_area *area, /* Install this LSA into LSDB. */ if (ospf_lsa_install(area->ospf, NULL /*oi */, new) == NULL) { - zlog_warn("EXT (%s): ospf_lsa_install() error", __func__); + flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE, + "EXT (%s): ospf_lsa_install() error", __func__); ospf_lsa_unlock(&new); return rc; } @@ -1120,7 +1121,8 @@ static int ospf_ext_link_lsa_originate1(struct ospf_area *area, /* Install this LSA into LSDB. */ if (ospf_lsa_install(area->ospf, NULL /*oi */, new) == NULL) { - zlog_warn("EXT (%s): ospf_lsa_install() error", __func__); + flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE, + "EXT (%s): ospf_lsa_install() error", __func__); ospf_lsa_unlock(&new); return rc; } @@ -1338,7 +1340,8 @@ static struct ospf_lsa *ospf_ext_pref_lsa_refresh(struct ospf_lsa *lsa) top = ospf_lookup_by_vrf_id(VRF_DEFAULT); if (ospf_lsa_install(top, NULL /*oi */, new) == NULL) { - zlog_warn("EXT (%s): ospf_lsa_install() error", __func__); + flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE, + "EXT (%s): ospf_lsa_install() error", __func__); ospf_lsa_unlock(&new); return NULL; } @@ -1410,7 +1413,8 @@ static struct ospf_lsa *ospf_ext_link_lsa_refresh(struct ospf_lsa *lsa) /* Install this LSA into LSDB. */ /* Given "lsa" will be freed in the next function */ if (ospf_lsa_install(top, NULL /*oi */, new) == NULL) { - zlog_warn("EXT (%s): Error installing new LSA", __func__); + flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE, + "EXT (%s): Error installing new LSA", __func__); ospf_lsa_unlock(&new); return NULL; } diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index c3c720b67..b2056e59c 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -50,7 +50,7 @@ #include "ospfd/ospf_ase.h" #include "ospfd/ospf_zebra.h" #include "ospfd/ospf_abr.h" - +#include "ospfd/ospf_errors.h" uint32_t get_metric(uint8_t *metric) { @@ -1817,12 +1817,11 @@ struct ospf_lsa *ospf_translated_nssa_originate(struct ospf *ospf, } if ((new = ospf_lsa_install(ospf, NULL, new)) == NULL) { - if (IS_DEBUG_OSPF_NSSA) - zlog_debug( - "ospf_lsa_translated_nssa_originate(): " - "Could not install LSA " - "id %s", - inet_ntoa(type7->data->id)); + flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE, + "ospf_lsa_translated_nssa_originate(): " + "Could not install LSA " + "id %s", + inet_ntoa(type7->data->id)); return NULL; } @@ -1918,11 +1917,10 @@ struct ospf_lsa *ospf_translated_nssa_refresh(struct ospf *ospf, } if (!(new = ospf_lsa_install(ospf, NULL, new))) { - if (IS_DEBUG_OSPF_NSSA) - zlog_debug( - "ospf_translated_nssa_refresh(): Could not install " - "translated LSA, Id %s", - inet_ntoa(type7->data->id)); + flog_warn( + OSPF_WARN_LSA_INSTALL_FAILURE, + "ospf_translated_nssa_refresh(): Could not install translated LSA, Id %s", + inet_ntoa(type7->data->id)); return NULL; } diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c index 2c813c307..ab25f1da4 100644 --- a/ospfd/ospf_ri.c +++ b/ospfd/ospf_ri.c @@ -826,7 +826,8 @@ static int ospf_router_info_lsa_originate1(void *arg) /* Install this LSA into LSDB. */ if (ospf_lsa_install(top, NULL /*oi */, new) == NULL) { - zlog_warn( + flog_warn( + OSPF_WARN_LSA_INSTALL_FAILURE, "ospf_router_info_lsa_originate1: ospf_lsa_install() ?"); ospf_lsa_unlock(&new); return rc; @@ -927,7 +928,8 @@ static struct ospf_lsa *ospf_router_info_lsa_refresh(struct ospf_lsa *lsa) /* Given "lsa" will be freed in the next function. */ top = ospf_lookup_by_vrf_id(lsa->vrf_id); if (ospf_lsa_install(top, NULL /*oi */, new) == NULL) { - zlog_warn("ospf_router_info_lsa_refresh: ospf_lsa_install() ?"); + flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE, + "ospf_router_info_lsa_refresh: ospf_lsa_install() ?"); ospf_lsa_unlock(&new); return new; } diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index abd3cf51f..12325f4fb 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -1223,7 +1223,7 @@ static int ospf_mpls_te_lsa_originate1(struct ospf_area *area, /* Install this LSA into LSDB. */ if (ospf_lsa_install(area->ospf, NULL /*oi*/, new) == NULL) { - flog_warn(OSPF_WARN_TE_UNEXPECTED, + flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE, "ospf_mpls_te_lsa_originate1: ospf_lsa_install() ?"); ospf_lsa_unlock(&new); return rc; @@ -1325,7 +1325,7 @@ static int ospf_mpls_te_lsa_originate2(struct ospf *top, /* Install this LSA into LSDB. */ if (ospf_lsa_install(top, NULL /*oi */, new) == NULL) { - flog_warn(OSPF_WARN_LSA_UNEXPECTED, + flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE, "ospf_mpls_te_lsa_originate2: ospf_lsa_install() ?"); ospf_lsa_unlock(&new); return rc; @@ -1467,7 +1467,7 @@ static struct ospf_lsa *ospf_mpls_te_lsa_refresh(struct ospf_lsa *lsa) top = area->ospf; if (ospf_lsa_install(top, NULL /*oi */, new) == NULL) { - flog_warn(OSPF_WARN_TE_UNEXPECTED, + flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE, "ospf_mpls_te_lsa_refresh: ospf_lsa_install() ?"); ospf_lsa_unlock(&new); return NULL; |