summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-09-13 20:56:04 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-09-13 20:56:04 +0200
commitcf444bcf40ca0c93402bdd79edafc7854512d92e (patch)
treefe00f8c3ef6a31732407142b799f41992de5e6ec
parentbgpd: BGP_[WARN|ERR] -> EC_BGP (diff)
downloadfrr-cf444bcf40ca0c93402bdd79edafc7854512d92e.tar.xz
frr-cf444bcf40ca0c93402bdd79edafc7854512d92e.zip
ospfd: OSPF_[ERR|WARN] -> EC_OSPF
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
-rw-r--r--ospfd/ospf_abr.c6
-rw-r--r--ospfd/ospf_apiserver.c8
-rw-r--r--ospfd/ospf_errors.c46
-rw-r--r--ospfd/ospf_errors.h46
-rw-r--r--ospfd/ospf_ext.c50
-rw-r--r--ospfd/ospf_lsa.c10
-rw-r--r--ospfd/ospf_main.c2
-rw-r--r--ospfd/ospf_nsm.c2
-rw-r--r--ospfd/ospf_opaque.c78
-rw-r--r--ospfd/ospf_packet.c120
-rw-r--r--ospfd/ospf_ri.c16
-rw-r--r--ospfd/ospf_routemap.c2
-rw-r--r--ospfd/ospf_spf.c2
-rw-r--r--ospfd/ospf_sr.c36
-rw-r--r--ospfd/ospf_te.c40
15 files changed, 232 insertions, 232 deletions
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 8cd61a4a9..870037efc 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -743,7 +743,7 @@ void ospf_abr_announce_network_to_area(struct prefix_ipv4 *p, uint32_t cost,
prefix2str((struct prefix *)p, buf,
sizeof(buf));
- flog_warn(OSPF_WARN_LSA_MISSING,
+ flog_warn(EC_OSPF_LSA_MISSING,
"%s: Could not refresh %s to %s",
__func__, buf,
inet_ntoa(area->area_id));
@@ -766,7 +766,7 @@ void ospf_abr_announce_network_to_area(struct prefix_ipv4 *p, uint32_t cost,
char buf[PREFIX2STR_BUFFER];
prefix2str((struct prefix *)p, buf, sizeof(buf));
- flog_warn(OSPF_WARN_LSA_MISSING,
+ flog_warn(EC_OSPF_LSA_MISSING,
"%s: Could not originate %s to %s", __func__,
buf, inet_ntoa(area->area_id));
return;
@@ -1135,7 +1135,7 @@ static void ospf_abr_announce_rtr_to_area(struct prefix_ipv4 *p, uint32_t cost,
char buf[PREFIX2STR_BUFFER];
prefix2str((struct prefix *)p, buf, sizeof(buf));
- flog_warn(OSPF_WARN_LSA_MISSING,
+ flog_warn(EC_OSPF_LSA_MISSING,
"%s: Could not refresh/originate %s to %s",
__func__, buf, inet_ntoa(area->area_id));
return;
diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c
index d4a8a266c..0f7652795 100644
--- a/ospfd/ospf_apiserver.c
+++ b/ospfd/ospf_apiserver.c
@@ -154,7 +154,7 @@ int ospf_apiserver_init(void)
ospf_apiserver_lsa_update, ospf_apiserver_lsa_delete);
if (rc != 0) {
flog_warn(
- OSPF_WARN_OPAQUE_REGISTRATION,
+ EC_OSPF_OPAQUE_REGISTRATION,
"ospf_apiserver_init: Failed to register opaque type [0/0]");
}
@@ -869,7 +869,7 @@ int ospf_apiserver_register_opaque_type(struct ospf_apiserver *apiserv,
NULL /* ospf_apiserver_lsa_delete */);
if (rc != 0) {
- flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
+ flog_warn(EC_OSPF_OPAQUE_REGISTRATION,
"Failed to register opaque type [%d/%d]", lsa_type,
opaque_type);
return OSPF_API_OPAQUETYPEINUSE;
@@ -1665,7 +1665,7 @@ int ospf_apiserver_originate1(struct ospf_lsa *lsa)
/* Install this LSA into LSDB. */
if (ospf_lsa_install(ospf, lsa->oi, lsa) == NULL) {
- flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE,
+ flog_warn(EC_OSPF_LSA_INSTALL_FAILURE,
"ospf_apiserver_originate1: ospf_lsa_install failed");
return -1;
}
@@ -1778,7 +1778,7 @@ struct ospf_lsa *ospf_apiserver_lsa_refresher(struct ospf_lsa *lsa)
/* Install LSA into LSDB. */
if (ospf_lsa_install(ospf, new->oi, new) == NULL) {
flog_warn(
- OSPF_WARN_LSA_INSTALL_FAILURE,
+ EC_OSPF_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 4646ed33b..566fc2920 100644
--- a/ospfd/ospf_errors.c
+++ b/ospfd/ospf_errors.c
@@ -26,85 +26,85 @@
/* clang-format off */
static struct log_ref ferr_ospf_warn[] = {
{
- .code = OSPF_WARN_SET_METRIC_PLUS,
+ .code = EC_OSPF_SET_METRIC_PLUS,
.title = "OSPF does not support `set metric +rtt/-rtt`",
.description = "This implementation of OSPF does not currently support `set metric +rtt/-rtt`",
.suggestion = "Do not use this particular set command for an ospf route-map",
},
{
- .code = OSPF_WARN_MD5,
+ .code = EC_OSPF_MD5,
.title = "OSPF has noticed a MD5 issue",
.description = "Something has gone wrong with the calculation of the MD5 data",
.suggestion = "Ensure your key is correct, gather log data from this side as well as peer and open an Issue",
},
{
- .code = OSPF_WARN_PACKET,
+ .code = EC_OSPF_PACKET,
.title = "OSPF has detected packet information missmatch",
.description = "OSPF has detected that packet information received is incorrect",
.suggestion = "Ensure interface configuration is correct, gather log files from here and the peer and open an Issue",
},
{
- .code = OSPF_WARN_LARGE_LSA,
+ .code = EC_OSPF_LARGE_LSA,
.title = "OSPF has determined that a LSA packet will be too large",
.description = "OSPF has received data that is causing it to recalculate how large packets should be and has discovered that the packet size needed would be too large and we will need to fragment packets",
.suggestion = "Further divide up your network with areas",
},
{
- .code = OSPF_WARN_LSA_UNEXPECTED,
+ .code = EC_OSPF_LSA_UNEXPECTED,
.title = "OSPF has received a LSA-type that it was not expecting",
.description = "OSPF has received a LSA-type that it was not expecting during processing",
.suggestion = "Gather log data from this machine and it's peer and open an Issue",
},
{
- .code = OSPF_WARN_LSA,
+ .code = EC_OSPF_LSA,
.title = "OSPF has discovered inconsistent internal state for a LSA",
.description = "During handling of a LSA, OSPF has discovered that the LSA's internal state is inconsistent",
.suggestion = "Gather log data and open an Issue",
},
{
- .code = OSPF_WARN_OPAQUE_REGISTRATION,
+ .code = EC_OSPF_OPAQUE_REGISTRATION,
.title = "OSPF has failed to properly register Opaque Handler",
.description = "During initialization OSPF has detected a failure to install an opaque handler",
.suggestion = "Gather log data and open an Issue",
},
{
- .code = OSPF_WARN_TE_UNEXPECTED,
+ .code = EC_OSPF_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 = "Gather log data from this machine and it's peer and open an Issue",
},
{
- .code = OSPF_WARN_LSA_INSTALL_FAILURE,
+ .code = EC_OSPF_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 = OSPF_WARN_LSA_NULL,
+ .code = EC_OSPF_LSA_NULL,
.title = "OSPF has received a NULL lsa pointer",
.description = "When processing a LSA update we have found and noticed an internal error where we are passing around a NULL pointer",
.suggestion = "Gather data from this machine and it's peer and open an Issue",
},
{
- .code = OSPF_WARN_EXT_LSA_UNEXPECTED,
+ .code = EC_OSPF_EXT_LSA_UNEXPECTED,
.title = "OSPF has received EXT information that leaves it in an unexpected state",
.description = "While processing EXT LSA information, OSPF has noticed that the internal state of OSPF has gotten inconsistent",
.suggestion = "Gather data from this machine and it's peer and open an Issue",
},
{
- .code = OSPF_WARN_LSA_MISSING,
+ .code = EC_OSPF_LSA_MISSING,
.title = "OSPF attempted to look up a LSA and it was not found",
.description = "During processing of new LSA information, we attempted to look up an old LSA and it was not found",
.suggestion = "Gather data from this machine and open an Issue",
},
{
- .code = OSPF_WARN_PTP_NEIGHBOR,
+ .code = EC_OSPF_PTP_NEIGHBOR,
.title = "OSPF has detected more than 1 neighbor on a P2P interface",
.description = "If you configure a ospf interface as P2P we should not detect more than one neighbor on the interface",
.suggestion = "Fix your config",
},
{
- .code = OSPF_WARN_LSA_SIZE,
+ .code = EC_OSPF_LSA_SIZE,
.title = "OSPF has detected an invalid LSA size",
.description = "OSPF has detected a state where we are attempting to grow a LSA but the LSA has reached it's maximum size",
.suggestion = "Gather data and open an Issue",
@@ -116,55 +116,55 @@ static struct log_ref ferr_ospf_warn[] = {
static struct log_ref ferr_ospf_err[] = {
{
- .code = OSPF_ERR_PKT_PROCESS,
+ .code = EC_OSPF_PKT_PROCESS,
.title = "Failure to process a packet",
.description = "OSPF attempted to process a received packet but could not",
.suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
},
{
- .code = OSPF_ERR_ROUTER_LSA_MISMATCH,
+ .code = EC_OSPF_ROUTER_LSA_MISMATCH,
.title = "Failure to process Router LSA",
.description = "OSPF attempted to process a Router LSA but Advertising ID mismatch with link id",
.suggestion = "Check OSPF network config for any config issue, If the problem persists, report the problem for troubleshooting"
},
{
- .code = OSPF_ERR_DOMAIN_CORRUPT,
+ .code = EC_OSPF_DOMAIN_CORRUPT,
.title = "OSPF Domain Corruption",
.description = "OSPF attempted to process a Router LSA but Advertising ID mismatch with link id",
.suggestion = "Check OSPF network Database for corrupted LSA, If the problem persists, shutdown OSPF domain and report the problem for troubleshooting"
},
{
- .code = OSPF_ERR_INIT_FAIL,
+ .code = EC_OSPF_INIT_FAIL,
.title = "OSPF Initialization failure",
.description = "OSPF failed to initialized OSPF default insance",
.suggestion = "Ensure there is adequate memory on the device. If the problem persists, report the problem for troubleshooting"
},
{
- .code = OSPF_ERR_SR_INVALID_DB,
+ .code = EC_OSPF_SR_INVALID_DB,
.title = "OSPF SR Invalid DB",
.description = "OSPF Segment Routing Database is invalid",
.suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
},
{
- .code = OSPF_ERR_SR_NODE_CREATE,
+ .code = EC_OSPF_SR_NODE_CREATE,
.title = "OSPF SR hash node creation failed",
.description = "OSPF Segment Routing node creation failed",
.suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
},
{
- .code = OSPF_ERR_SR_INVALID_LSA_ID,
+ .code = EC_OSPF_SR_INVALID_LSA_ID,
.title = "OSPF SR Invalid LSA ID",
.description = "OSPF Segment Routing invalid lsa id",
.suggestion = "Restart OSPF instance, If the problem persists, report the problem for troubleshooting"
},
{
- .code = OSPF_ERR_INVALID_ALGORITHM,
+ .code = EC_OSPF_INVALID_ALGORITHM,
.title = "OSPF SR Invalid Algorithm",
.description = "OSPF Segment Routing invalid Algorithm",
.suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
},
{
- .code = OSPF_ERR_FSM_INVALID_STATE,
+ .code = EC_OSPF_FSM_INVALID_STATE,
.title = "OSPF FSM invalid state detected",
.description = "OSPF has attempted to change states when it should not be able to",
.suggestion = "Gather log files and open an issue",
diff --git a/ospfd/ospf_errors.h b/ospfd/ospf_errors.h
index 664f6f1bd..cea649a6f 100644
--- a/ospfd/ospf_errors.h
+++ b/ospfd/ospf_errors.h
@@ -24,29 +24,29 @@
#include "lib/ferr.h"
enum ospf_log_refs {
- OSPF_ERR_PKT_PROCESS = OSPF_FERR_START,
- OSPF_ERR_ROUTER_LSA_MISMATCH,
- OSPF_ERR_DOMAIN_CORRUPT,
- OSPF_ERR_INIT_FAIL,
- OSPF_ERR_SR_INVALID_DB,
- OSPF_ERR_SR_NODE_CREATE,
- OSPF_ERR_SR_INVALID_LSA_ID,
- OSPF_ERR_INVALID_ALGORITHM,
- OSPF_ERR_FSM_INVALID_STATE,
- OSPF_WARN_SET_METRIC_PLUS,
- OSPF_WARN_MD5,
- OSPF_WARN_PACKET,
- OSPF_WARN_LARGE_LSA,
- OSPF_WARN_LSA_UNEXPECTED,
- OSPF_WARN_LSA,
- OSPF_WARN_OPAQUE_REGISTRATION,
- OSPF_WARN_TE_UNEXPECTED,
- OSPF_WARN_LSA_INSTALL_FAILURE,
- OSPF_WARN_LSA_NULL,
- OSPF_WARN_EXT_LSA_UNEXPECTED,
- OSPF_WARN_LSA_MISSING,
- OSPF_WARN_PTP_NEIGHBOR,
- OSPF_WARN_LSA_SIZE,
+ EC_OSPF_PKT_PROCESS = OSPF_FERR_START,
+ EC_OSPF_ROUTER_LSA_MISMATCH,
+ EC_OSPF_DOMAIN_CORRUPT,
+ EC_OSPF_INIT_FAIL,
+ EC_OSPF_SR_INVALID_DB,
+ EC_OSPF_SR_NODE_CREATE,
+ EC_OSPF_SR_INVALID_LSA_ID,
+ EC_OSPF_INVALID_ALGORITHM,
+ EC_OSPF_FSM_INVALID_STATE,
+ EC_OSPF_SET_METRIC_PLUS,
+ EC_OSPF_MD5,
+ EC_OSPF_PACKET,
+ EC_OSPF_LARGE_LSA,
+ EC_OSPF_LSA_UNEXPECTED,
+ EC_OSPF_LSA,
+ EC_OSPF_OPAQUE_REGISTRATION,
+ EC_OSPF_TE_UNEXPECTED,
+ EC_OSPF_LSA_INSTALL_FAILURE,
+ EC_OSPF_LSA_NULL,
+ EC_OSPF_EXT_LSA_UNEXPECTED,
+ EC_OSPF_LSA_MISSING,
+ EC_OSPF_PTP_NEIGHBOR,
+ EC_OSPF_LSA_SIZE,
};
extern void ospf_error_init(void);
diff --git a/ospfd/ospf_ext.c b/ospfd/ospf_ext.c
index 1aab61168..316019c15 100644
--- a/ospfd/ospf_ext.c
+++ b/ospfd/ospf_ext.c
@@ -137,7 +137,7 @@ int ospf_ext_init(void)
NULL); /* del_lsa_hook */
if (rc != 0) {
- flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
+ flog_warn(EC_OSPF_OPAQUE_REGISTRATION,
"EXT (%s): Failed to register Extended Link LSA",
__func__);
return rc;
@@ -159,7 +159,7 @@ int ospf_ext_init(void)
ospf_ext_pref_lsa_update, /* new_lsa_hook */
NULL); /* del_lsa_hook */
if (rc != 0) {
- flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
+ flog_warn(EC_OSPF_OPAQUE_REGISTRATION,
"EXT (%s): Failed to register Extended Prefix LSA",
__func__);
return rc;
@@ -315,7 +315,7 @@ static void set_prefix_sid(struct ext_itf *exti, uint8_t algorithm,
if ((algorithm != SR_ALGORITHM_SPF)
&& (algorithm != SR_ALGORITHM_STRICT_SPF)) {
- flog_err(OSPF_ERR_INVALID_ALGORITHM,
+ flog_err(EC_OSPF_INVALID_ALGORITHM,
"EXT (%s): unrecognized algorithm, not SPF or S-SPF",
__func__);
return;
@@ -571,7 +571,7 @@ static int ospf_ext_link_del_if(struct interface *ifp)
rc = 0;
} else {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): interface %s is not found", __func__,
ifp ? ifp->name : "-");
}
@@ -619,7 +619,7 @@ static void ospf_ext_pref_ism_change(struct ospf_interface *oi, int old_status)
/* Get interface information for Segment Routing */
exti = lookup_ext_by_ifp(oi->ifp);
if (exti == NULL) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): Cannot get Extended info. from OI(%s)",
__func__, IF_NAME(oi));
return;
@@ -657,14 +657,14 @@ static void ospf_ext_link_nsm_change(struct ospf_neighbor *nbr, int old_status)
/* Get interface information for Segment Routing */
exti = lookup_ext_by_ifp(oi->ifp);
if (exti == NULL) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): Cannot get Extended info. from OI(%s)",
__func__, IF_NAME(oi));
return;
}
if (oi->area == NULL || oi->area->ospf == NULL) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): Cannot refer to OSPF from OI(%s)",
__func__, IF_NAME(oi));
return;
@@ -760,7 +760,7 @@ static int ospf_ext_link_lsa_update(struct ospf_lsa *lsa)
{
/* Sanity Check */
if (lsa == NULL) {
- flog_warn(OSPF_WARN_LSA_NULL, "EXT (%s): Abort! LSA is NULL",
+ flog_warn(EC_OSPF_LSA_NULL, "EXT (%s): Abort! LSA is NULL",
__func__);
return -1;
}
@@ -794,7 +794,7 @@ static int ospf_ext_pref_lsa_update(struct ospf_lsa *lsa)
/* Sanity Check */
if (lsa == NULL) {
- flog_warn(OSPF_WARN_LSA_NULL, "EXT (%s): Abort! LSA is NULL",
+ flog_warn(EC_OSPF_LSA_NULL, "EXT (%s): Abort! LSA is NULL",
__func__);
return -1;
}
@@ -1062,14 +1062,14 @@ static int ospf_ext_pref_lsa_originate1(struct ospf_area *area,
/* Create new Opaque-LSA/Extended Prefix Opaque LSA instance. */
new = ospf_ext_pref_lsa_new(area, exti);
if (new == NULL) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): ospf_ext_pref_lsa_new() error", __func__);
return rc;
}
/* Install this LSA into LSDB. */
if (ospf_lsa_install(area->ospf, NULL /*oi */, new) == NULL) {
- flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE,
+ flog_warn(EC_OSPF_LSA_INSTALL_FAILURE,
"EXT (%s): ospf_lsa_install() error", __func__);
ospf_lsa_unlock(&new);
return rc;
@@ -1116,14 +1116,14 @@ static int ospf_ext_link_lsa_originate1(struct ospf_area *area,
/* Create new Opaque-LSA/Extended Link Opaque LSA instance. */
new = ospf_ext_link_lsa_new(area, exti);
if (new == NULL) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): ospf_ext_link_lsa_new() error", __func__);
return rc;
}
/* Install this LSA into LSDB. */
if (ospf_lsa_install(area->ospf, NULL /*oi */, new) == NULL) {
- flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE,
+ flog_warn(EC_OSPF_LSA_INSTALL_FAILURE,
"EXT (%s): ospf_lsa_install() error", __func__);
ospf_lsa_unlock(&new);
return rc;
@@ -1191,7 +1191,7 @@ static int ospf_ext_pref_lsa_originate(void *arg)
if (CHECK_FLAG(exti->flags,
EXT_LPFLG_LSA_FORCED_REFRESH)) {
flog_warn(
- OSPF_WARN_EXT_LSA_UNEXPECTED,
+ EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): Refresh instead of Originate",
__func__);
UNSET_FLAG(exti->flags,
@@ -1249,7 +1249,7 @@ static int ospf_ext_link_lsa_originate(void *arg)
if (CHECK_FLAG(exti->flags,
EXT_LPFLG_LSA_FORCED_REFRESH)) {
flog_warn(
- OSPF_WARN_EXT_LSA_UNEXPECTED,
+ EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): Refresh instead of Originate",
__func__);
UNSET_FLAG(exti->flags,
@@ -1300,7 +1300,7 @@ static struct ospf_lsa *ospf_ext_pref_lsa_refresh(struct ospf_lsa *lsa)
/* Lookup this lsa corresponding Extended parameters */
exti = lookup_ext_by_instance(lsa);
if (exti == NULL) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): Invalid parameter LSA ID", __func__);
/* Flush it anyway. */
lsa->data->ls_age = htons(OSPF_LSA_MAXAGE);
@@ -1308,7 +1308,7 @@ static struct ospf_lsa *ospf_ext_pref_lsa_refresh(struct ospf_lsa *lsa)
/* Check if Interface was not disable in the interval */
if ((exti != NULL) && !CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE)) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): Interface was Disabled: Flush it!",
__func__);
/* Flush it anyway. */
@@ -1327,7 +1327,7 @@ static struct ospf_lsa *ospf_ext_pref_lsa_refresh(struct ospf_lsa *lsa)
new = ospf_ext_pref_lsa_new(area, exti);
if (new == NULL) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): ospf_ext_pref_lsa_new() error", __func__);
return NULL;
}
@@ -1345,7 +1345,7 @@ 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) {
- flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE,
+ flog_warn(EC_OSPF_LSA_INSTALL_FAILURE,
"EXT (%s): ospf_lsa_install() error", __func__);
ospf_lsa_unlock(&new);
return NULL;
@@ -1387,7 +1387,7 @@ static struct ospf_lsa *ospf_ext_link_lsa_refresh(struct ospf_lsa *lsa)
/* Lookup this LSA corresponding Extended parameters */
exti = lookup_ext_by_instance(lsa);
if (exti == NULL) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): Invalid parameter LSA ID", __func__);
/* Flush it anyway. */
lsa->data->ls_age = htons(OSPF_LSA_MAXAGE);
@@ -1395,7 +1395,7 @@ static struct ospf_lsa *ospf_ext_link_lsa_refresh(struct ospf_lsa *lsa)
/* Check if Interface was not disable in the interval */
if ((exti != NULL) && !CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE)) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): Interface was Disabled: Flush it!",
__func__);
lsa->data->ls_age = htons(OSPF_LSA_MAXAGE);
@@ -1412,7 +1412,7 @@ static struct ospf_lsa *ospf_ext_link_lsa_refresh(struct ospf_lsa *lsa)
/* Create new Opaque-LSA/Extended Link instance */
new = ospf_ext_link_lsa_new(area, exti);
if (new == NULL) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): Error creating new LSA", __func__);
return NULL;
}
@@ -1421,7 +1421,7 @@ 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) {
- flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE,
+ flog_warn(EC_OSPF_LSA_INSTALL_FAILURE,
"EXT (%s): Error installing new LSA", __func__);
ospf_lsa_unlock(&new);
return NULL;
@@ -1470,7 +1470,7 @@ static void ospf_ext_pref_lsa_schedule(struct ext_itf *exti,
/* Set LSA header information */
if (exti->area == NULL) {
flog_warn(
- OSPF_WARN_EXT_LSA_UNEXPECTED,
+ EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): Flooding is Area scope but area is not yet set",
__func__);
if (OspfEXT.area == NULL) {
@@ -1531,7 +1531,7 @@ static void ospf_ext_link_lsa_schedule(struct ext_itf *exti,
/* Set LSA header information */
if (exti->area == NULL) {
flog_warn(
- OSPF_WARN_EXT_LSA_UNEXPECTED,
+ EC_OSPF_EXT_LSA_UNEXPECTED,
"EXT (%s): Flooding is Area scope but area is not yet set",
__func__);
if (OspfEXT.area == NULL) {
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 4d46e9739..a752630a3 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -398,7 +398,7 @@ struct ospf_neighbor *ospf_nbr_lookup_ptop(struct ospf_interface *oi)
/* PtoP link must have only 1 neighbor. */
if (ospf_nbr_count(oi, 0) > 1)
- flog_warn(OSPF_WARN_PTP_NEIGHBOR,
+ flog_warn(EC_OSPF_PTP_NEIGHBOR,
"Point-to-Point link has more than 1 neighobrs.");
return nbr;
@@ -448,7 +448,7 @@ static char link_info_set(struct stream **s, struct in_addr id,
if (ret == OSPF_MAX_LSA_SIZE) {
flog_warn(
- OSPF_WARN_LSA_SIZE,
+ EC_OSPF_LSA_SIZE,
"%s: Out of space in LSA stream, left %zd, size %zd",
__func__, STREAM_WRITEABLE(*s),
STREAM_SIZE(*s));
@@ -1819,7 +1819,7 @@ struct ospf_lsa *ospf_translated_nssa_originate(struct ospf *ospf,
}
if ((new = ospf_lsa_install(ospf, NULL, new)) == NULL) {
- flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE,
+ flog_warn(EC_OSPF_LSA_INSTALL_FAILURE,
"ospf_lsa_translated_nssa_originate(): "
"Could not install LSA "
"id %s",
@@ -1920,7 +1920,7 @@ struct ospf_lsa *ospf_translated_nssa_refresh(struct ospf *ospf,
if (!(new = ospf_lsa_install(ospf, NULL, new))) {
flog_warn(
- OSPF_WARN_LSA_INSTALL_FAILURE,
+ EC_OSPF_LSA_INSTALL_FAILURE,
"ospf_translated_nssa_refresh(): Could not install translated LSA, Id %s",
inet_ntoa(type7->data->id));
return NULL;
@@ -2061,7 +2061,7 @@ int ospf_external_lsa_originate_timer(struct thread *thread)
if (!ospf_external_lsa_originate(ospf, ei))
flog_warn(
- OSPF_WARN_LSA_INSTALL_FAILURE,
+ EC_OSPF_LSA_INSTALL_FAILURE,
"LSA: AS-external-LSA was not originated.");
}
}
diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c
index 8853802d0..6095b13c9 100644
--- a/ospfd/ospf_main.c
+++ b/ospfd/ospf_main.c
@@ -216,7 +216,7 @@ int main(int argc, char **argv)
ospf',
when quagga(ospfd) is restarted */
if (!ospf_get_instance(instance)) {
- flog_err(OSPF_ERR_INIT_FAIL, "OSPF instance init failed: %s",
+ flog_err(EC_OSPF_INIT_FAIL, "OSPF instance init failed: %s",
strerror(errno));
exit(1);
}
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c
index fc8b516af..91d187f41 100644
--- a/ospfd/ospf_nsm.c
+++ b/ospfd/ospf_nsm.c
@@ -797,7 +797,7 @@ int ospf_nsm_event(struct thread *thread)
* try set next_state.
*/
flog_err(
- OSPF_ERR_FSM_INVALID_STATE,
+ EC_OSPF_FSM_INVALID_STATE,
"NSM[%s:%s]: %s (%s): "
"Warning: action tried to change next_state to %s",
IF_NAME(nbr->oi), inet_ntoa(nbr->router_id),
diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c
index 9066dda73..bbc559ca3 100644
--- a/ospfd/ospf_opaque.c
+++ b/ospfd/ospf_opaque.c
@@ -353,7 +353,7 @@ static struct list *ospf_get_opaque_funclist(uint8_t lsa_type)
funclist = ospf_opaque_type11_funclist;
break;
default:
- flog_warn(OSPF_WARN_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_LSA_UNEXPECTED,
"ospf_get_opaque_funclist: Unexpected LSA-type(%u)",
lsa_type);
break;
@@ -389,7 +389,7 @@ int ospf_register_opaque_functab(
for (ALL_LIST_ELEMENTS(funclist, node, nnode, functab))
if (functab->opaque_type == opaque_type) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_register_opaque_functab: Duplicated entry?: lsa_type(%u), opaque_type(%u)",
lsa_type, opaque_type);
return -1;
@@ -568,7 +568,7 @@ register_opaque_info_per_type(struct ospf_opaque_functab *functab,
break;
default:
flog_warn(
- OSPF_WARN_LSA_UNEXPECTED,
+ EC_OSPF_LSA_UNEXPECTED,
"register_opaque_info_per_type: Unexpected LSA-type(%u)",
new->data->type);
free_opaque_info_per_type((void *)oipt);
@@ -613,7 +613,7 @@ static void free_opaque_info_owner(void *val)
break;
}
default:
- flog_warn(OSPF_WARN_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_LSA_UNEXPECTED,
"free_opaque_info_owner: Unexpected LSA-type(%u)",
oipt->lsa_type);
break; /* This case may not exist. */
@@ -659,7 +659,7 @@ lookup_opaque_info_by_type(struct ospf_lsa *lsa)
listtop = oi->opaque_lsa_self;
else
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"Type-9 Opaque-LSA: Reference to OI is missing?");
break;
case OSPF_OPAQUE_AREA_LSA:
@@ -667,21 +667,21 @@ lookup_opaque_info_by_type(struct ospf_lsa *lsa)
listtop = area->opaque_lsa_self;
else
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"Type-10 Opaque-LSA: Reference to AREA is missing?");
break;
case OSPF_OPAQUE_AS_LSA:
top = ospf_lookup_by_vrf_id(lsa->vrf_id);
if ((area = lsa->area) != NULL && (top = area->ospf) == NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"Type-11 Opaque-LSA: Reference to OSPF is missing?");
break; /* Unlikely to happen. */
}
listtop = top->opaque_lsa_self;
break;
default:
- flog_warn(OSPF_WARN_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_LSA_UNEXPECTED,
"lookup_opaque_info_by_type: Unexpected LSA-type(%u)",
lsa->data->type);
break;
@@ -1523,7 +1523,7 @@ static void ospf_opaque_lsa_reoriginate_resume(struct list *listtop, void *arg)
if ((*functab->lsa_originator)(arg) != 0) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_lsa_reoriginate_resume: Failed (opaque-type=%u)",
oipt->opaque_type);
continue;
@@ -1563,7 +1563,7 @@ struct ospf_lsa *ospf_opaque_lsa_install(struct ospf_lsa *lsa, int rt_recalc)
}
/* Register the new lsa entry and get its control info. */
else if ((oipi = register_opaque_lsa(lsa)) == NULL) {
- flog_warn(OSPF_WARN_LSA,
+ flog_warn(EC_OSPF_LSA,
"ospf_opaque_lsa_install: register_opaque_lsa() ?");
goto out;
}
@@ -1576,7 +1576,7 @@ struct ospf_lsa *ospf_opaque_lsa_install(struct ospf_lsa *lsa, int rt_recalc)
case OSPF_OPAQUE_LINK_LSA:
if ((top = oi_to_top(lsa->oi)) == NULL) {
/* Above conditions must have passed. */
- flog_warn(OSPF_WARN_LSA,
+ flog_warn(EC_OSPF_LSA,
"ospf_opaque_lsa_install: Something wrong?");
goto out;
}
@@ -1584,7 +1584,7 @@ struct ospf_lsa *ospf_opaque_lsa_install(struct ospf_lsa *lsa, int rt_recalc)
case OSPF_OPAQUE_AREA_LSA:
if (lsa->area == NULL || (top = lsa->area->ospf) == NULL) {
/* Above conditions must have passed. */
- flog_warn(OSPF_WARN_LSA,
+ flog_warn(EC_OSPF_LSA,
"ospf_opaque_lsa_install: Something wrong?");
goto out;
}
@@ -1593,13 +1593,13 @@ struct ospf_lsa *ospf_opaque_lsa_install(struct ospf_lsa *lsa, int rt_recalc)
top = ospf_lookup_by_vrf_id(lsa->vrf_id);
if (lsa->area != NULL && (top = lsa->area->ospf) == NULL) {
/* Above conditions must have passed. */
- flog_warn(OSPF_WARN_LSA,
+ flog_warn(EC_OSPF_LSA,
"ospf_opaque_lsa_install: Something wrong?");
goto out;
}
break;
default:
- flog_warn(OSPF_WARN_LSA_UNEXPECTED,
+ flog_warn(EC_OSPF_LSA_UNEXPECTED,
"ospf_opaque_lsa_install: Unexpected LSA-type(%u)",
lsa->data->type);
goto out;
@@ -1673,13 +1673,13 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
if ((oi = (struct ospf_interface *)lsa_type_dependent)
== NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_lsa_reoriginate_schedule: Type-9 Opaque-LSA: Invalid parameter?");
goto out;
}
if ((top = oi_to_top(oi)) == NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_lsa_reoriginate_schedule: OI(%s) -> TOP?",
IF_NAME(oi));
goto out;
@@ -1688,7 +1688,7 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
&& list_isempty(oi->opaque_lsa_self)
&& oi->t_opaque_lsa_self != NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"Type-9 Opaque-LSA (opaque_type=%u): Common origination for OI(%s) has already started",
opaque_type, IF_NAME(oi));
goto out;
@@ -1698,13 +1698,13 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
case OSPF_OPAQUE_AREA_LSA:
if ((area = (struct ospf_area *)lsa_type_dependent) == NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_lsa_reoriginate_schedule: Type-10 Opaque-LSA: Invalid parameter?");
goto out;
}
if ((top = area->ospf) == NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_lsa_reoriginate_schedule: AREA(%s) -> TOP?",
inet_ntoa(area->area_id));
goto out;
@@ -1713,7 +1713,7 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
&& list_isempty(area->opaque_lsa_self)
&& area->t_opaque_lsa_self != NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"Type-10 Opaque-LSA (opaque_type=%u): Common origination for AREA(%s) has already started",
opaque_type, inet_ntoa(area->area_id));
goto out;
@@ -1723,7 +1723,7 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
case OSPF_OPAQUE_AS_LSA:
if ((top = (struct ospf *)lsa_type_dependent) == NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_lsa_reoriginate_schedule: Type-11 Opaque-LSA: Invalid parameter?");
goto out;
}
@@ -1731,7 +1731,7 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
&& list_isempty(top->opaque_lsa_self)
&& top->t_opaque_lsa_self != NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"Type-11 Opaque-LSA (opaque_type=%u): Common origination has already started",
opaque_type);
goto out;
@@ -1745,7 +1745,7 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
break;
default:
flog_warn(
- OSPF_WARN_LSA_UNEXPECTED,
+ EC_OSPF_LSA_UNEXPECTED,
"ospf_opaque_lsa_reoriginate_schedule: Unexpected LSA-type(%u)",
lsa_type);
goto out;
@@ -1767,7 +1767,7 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
struct ospf_opaque_functab *functab;
if ((functab = ospf_opaque_functab_lookup(lsa)) == NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_lsa_reoriginate_schedule: No associated function?: lsa_type(%u), opaque_type(%u)",
lsa_type, opaque_type);
goto out;
@@ -1775,7 +1775,7 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
if ((oipt = register_opaque_info_per_type(functab, lsa))
== NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_lsa_reoriginate_schedule: Cannot get a control info?: lsa_type(%u), opaque_type(%u)",
lsa_type, opaque_type);
goto out;
@@ -1848,7 +1848,7 @@ static int ospf_opaque_type9_lsa_reoriginate_timer(struct thread *t)
if ((functab = oipt->functab) == NULL
|| functab->lsa_originator == NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_type9_lsa_reoriginate_timer: No associated function?");
goto out;
}
@@ -1856,7 +1856,7 @@ static int ospf_opaque_type9_lsa_reoriginate_timer(struct thread *t)
oi = (struct ospf_interface *)oipt->owner;
if ((top = oi_to_top(oi)) == NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_type9_lsa_reoriginate_timer: Something wrong?");
goto out;
}
@@ -1900,7 +1900,7 @@ static int ospf_opaque_type10_lsa_reoriginate_timer(struct thread *t)
if ((functab = oipt->functab) == NULL
|| functab->lsa_originator == NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_type10_lsa_reoriginate_timer: No associated function?");
goto out;
}
@@ -1908,7 +1908,7 @@ static int ospf_opaque_type10_lsa_reoriginate_timer(struct thread *t)
area = (struct ospf_area *)oipt->owner;
if (area == NULL || (top = area->ospf) == NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_type10_lsa_reoriginate_timer: Something wrong?");
goto out;
}
@@ -1956,14 +1956,14 @@ static int ospf_opaque_type11_lsa_reoriginate_timer(struct thread *t)
if ((functab = oipt->functab) == NULL
|| functab->lsa_originator == NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_type11_lsa_reoriginate_timer: No associated function?");
goto out;
}
if ((top = (struct ospf *)oipt->owner) == NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_type11_lsa_reoriginate_timer: Something wrong?");
goto out;
}
@@ -2000,14 +2000,14 @@ void ospf_opaque_lsa_refresh_schedule(struct ospf_lsa *lsa0)
if ((oipt = lookup_opaque_info_by_type(lsa0)) == NULL
|| (oipi = lookup_opaque_info_by_id(oipt, lsa0)) == NULL) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_opaque_lsa_refresh_schedule: Invalid parameter?");
goto out;
}
/* Given "lsa0" and current "oipi->lsa" may different, but harmless. */
if ((lsa = oipi->lsa) == NULL) {
- flog_warn(OSPF_WARN_LSA,
+ flog_warn(EC_OSPF_LSA,
"ospf_opaque_lsa_refresh_schedule: Something wrong?");
goto out;
}
@@ -2036,7 +2036,7 @@ void ospf_opaque_lsa_refresh_schedule(struct ospf_lsa *lsa0)
break;
default:
flog_warn(
- OSPF_WARN_LSA_UNEXPECTED,
+ EC_OSPF_LSA_UNEXPECTED,
"ospf_opaque_lsa_refresh_schedule: Unexpected LSA-type(%u)",
lsa->data->type);
goto out;
@@ -2088,14 +2088,14 @@ void ospf_opaque_lsa_flush_schedule(struct ospf_lsa *lsa0)
if ((oipt = lookup_opaque_info_by_type(lsa0)) == NULL
|| (oipi = lookup_opaque_info_by_id(oipt, lsa0)) == NULL) {
- flog_warn(OSPF_WARN_LSA,
+ flog_warn(EC_OSPF_LSA,
"ospf_opaque_lsa_flush_schedule: Invalid parameter?");
goto out;
}
/* Given "lsa0" and current "oipi->lsa" may different, but harmless. */
if ((lsa = oipi->lsa) == NULL) {
- flog_warn(OSPF_WARN_LSA,
+ flog_warn(EC_OSPF_LSA,
"ospf_opaque_lsa_flush_schedule: Something wrong?");
goto out;
}
@@ -2113,7 +2113,7 @@ void ospf_opaque_lsa_flush_schedule(struct ospf_lsa *lsa0)
break;
default:
flog_warn(
- OSPF_WARN_LSA_UNEXPECTED,
+ EC_OSPF_LSA_UNEXPECTED,
"ospf_opaque_lsa_flush_schedule: Unexpected LSA-type(%u)",
lsa->data->type);
goto out;
@@ -2171,7 +2171,7 @@ void ospf_opaque_self_originated_lsa_received(struct ospf_neighbor *nbr,
break;
default:
flog_warn(
- OSPF_WARN_LSA_UNEXPECTED,
+ EC_OSPF_LSA_UNEXPECTED,
"ospf_opaque_self_originated_lsa_received: Unexpected LSA-type(%u)",
lsa->data->type);
return;
@@ -2190,7 +2190,7 @@ struct ospf *oi_to_top(struct ospf_interface *oi)
if (oi == NULL || (area = oi->area) == NULL
|| (top = area->ospf) == NULL)
- flog_warn(OSPF_WARN_LSA,
+ flog_warn(EC_OSPF_LSA,
"Broken relationship for \"OI -> AREA -> OSPF\"?");
return top;
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 59340fbf1..d8c1bc1a9 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -233,7 +233,7 @@ void ospf_packet_add(struct ospf_interface *oi, struct ospf_packet *op)
{
if (!oi->obuf) {
flog_err(
- OSPF_ERR_PKT_PROCESS,
+ EC_OSPF_PKT_PROCESS,
"ospf_packet_add(interface %s in state %d [%s], packet type %s, "
"destination %s) called with NULL obuf, ignoring "
"(please report this bug)!\n",
@@ -257,7 +257,7 @@ static void ospf_packet_add_top(struct ospf_interface *oi,
{
if (!oi->obuf) {
flog_err(
- OSPF_ERR_PKT_PROCESS,
+ EC_OSPF_PKT_PROCESS,
"ospf_packet_add(interface %s in state %d [%s], packet type %s, "
"destination %s) called with NULL obuf, ignoring "
"(please report this bug)!\n",
@@ -342,7 +342,7 @@ static int ospf_check_md5_digest(struct ospf_interface *oi,
ck = ospf_crypt_key_lookup(OSPF_IF_PARAM(oi, auth_crypt),
ospfh->u.crypt.key_id);
if (ck == NULL) {
- flog_warn(OSPF_WARN_MD5,
+ flog_warn(EC_OSPF_MD5,
"interface %s: ospf_check_md5 no key %d", IF_NAME(oi),
ospfh->u.crypt.key_id);
return 0;
@@ -354,7 +354,7 @@ static int ospf_check_md5_digest(struct ospf_interface *oi,
if (nbr
&& ntohl(nbr->crypt_seqnum) > ntohl(ospfh->u.crypt.crypt_seqnum)) {
flog_warn(
- OSPF_WARN_MD5,
+ EC_OSPF_MD5,
"interface %s: ospf_check_md5 bad sequence %d (expect %d)",
IF_NAME(oi), ntohl(ospfh->u.crypt.crypt_seqnum),
ntohl(nbr->crypt_seqnum));
@@ -370,7 +370,7 @@ static int ospf_check_md5_digest(struct ospf_interface *oi,
/* compare the two */
if (memcmp((caddr_t)ospfh + length, digest, OSPF_AUTH_MD5_SIZE)) {
- flog_warn(OSPF_WARN_MD5,
+ flog_warn(EC_OSPF_MD5,
"interface %s: ospf_check_md5 checksum mismatch",
IF_NAME(oi));
return 0;
@@ -438,7 +438,7 @@ static int ospf_make_md5_digest(struct ospf_interface *oi,
if (stream_get_endp(op->s) != op->length)
/* XXX size_t */
flog_warn(
- OSPF_WARN_MD5,
+ EC_OSPF_MD5,
"ospf_make_md5_digest: length mismatch stream %lu ospf_packet %u",
(unsigned long)stream_get_endp(op->s), op->length);
@@ -923,7 +923,7 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh,
&& oi->type != OSPF_IFTYPE_VIRTUALLINK)
if (oi->address->prefixlen != p.prefixlen) {
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"Packet %s [Hello:RECV]: NetworkMask mismatch on %s (configured prefix length is %d, but hello packet indicates %d).",
inet_ntoa(ospfh->router_id), IF_NAME(oi),
(int)oi->address->prefixlen, (int)p.prefixlen);
@@ -932,7 +932,7 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh,
/* Compare Router Dead Interval. */
if (OSPF_IF_PARAM(oi, v_wait) != ntohl(hello->dead_interval)) {
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Packet %s [Hello:RECV]: RouterDeadInterval mismatch "
"(expected %u, but received %u).",
inet_ntoa(ospfh->router_id),
@@ -946,7 +946,7 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh,
if (OSPF_IF_PARAM(oi, v_hello)
!= ntohs(hello->hello_interval)) {
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"Packet %s [Hello:RECV]: HelloInterval mismatch "
"(expected %u, but received %u).",
inet_ntoa(ospfh->router_id),
@@ -971,7 +971,7 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh,
* Drop this Hello packet not to establish neighbor
* relationship.
*/
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Packet %s [Hello:RECV]: T-bit on, drop it.",
inet_ntoa(ospfh->router_id));
return;
@@ -984,7 +984,7 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh,
* This router does know the correct usage of O-bit
* the bit should be set in DD packet only.
*/
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Packet %s [Hello:RECV]: O-bit abuse?",
inet_ntoa(ospfh->router_id));
#ifdef STRICT_OBIT_USAGE_CHECK
@@ -1002,7 +1002,7 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh,
&& !CHECK_FLAG(OPTIONS(oi), OSPF_OPTION_E)
&& !CHECK_FLAG(hello->options, OSPF_OPTION_E))) {
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"NSSA-Packet-%s[Hello:RECV]: my options: %x, his options %x",
inet_ntoa(ospfh->router_id), OPTIONS(oi),
hello->options);
@@ -1020,7 +1020,7 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh,
if (CHECK_FLAG(OPTIONS(oi), OSPF_OPTION_E)
!= CHECK_FLAG(hello->options, OSPF_OPTION_E)) {
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"Packet %s [Hello:RECV]: my options: %x, his options %x",
inet_ntoa(ospfh->router_id), OPTIONS(oi),
hello->options);
@@ -1137,7 +1137,7 @@ static void ospf_db_desc_proc(struct stream *s, struct ospf_interface *oi,
/* Unknown LS type. */
if (lsah->type < OSPF_MIN_LSA || lsah->type >= OSPF_MAX_LSA) {
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Packet [DD:RECV]: Unknown LS type %d.",
lsah->type);
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_SeqNumberMismatch);
@@ -1146,7 +1146,7 @@ static void ospf_db_desc_proc(struct stream *s, struct ospf_interface *oi,
if (IS_OPAQUE_LSA(lsah->type)
&& !CHECK_FLAG(nbr->options, OSPF_OPTION_O)) {
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"LSA[Type%d:%s]: Opaque capability mismatch?",
lsah->type, inet_ntoa(lsah->id));
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_SeqNumberMismatch);
@@ -1161,7 +1161,7 @@ static void ospf_db_desc_proc(struct stream *s, struct ospf_interface *oi,
allow if from NSSA. */
if (oi->area->external_routing == OSPF_AREA_STUB) {
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"Packet [DD:RECV]: LSA[Type%d:%s] from %s area.",
lsah->type, inet_ntoa(lsah->id),
(oi->area->external_routing
@@ -1288,7 +1288,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
nbr = ospf_nbr_lookup(oi, iph, ospfh);
if (nbr == NULL) {
- flog_warn(OSPF_WARN_PACKET, "Packet[DD]: Unknown Neighbor %s",
+ flog_warn(EC_OSPF_PACKET, "Packet[DD]: Unknown Neighbor %s",
inet_ntoa(ospfh->router_id));
return;
}
@@ -1297,7 +1297,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
if ((OSPF_IF_PARAM(oi, mtu_ignore) == 0)
&& (ntohs(dd->mtu) > oi->ifp->mtu)) {
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"Packet[DD]: Neighbor %s MTU %u is larger than [%s]'s MTU %u",
inet_ntoa(nbr->router_id), ntohs(dd->mtu), IF_NAME(oi),
oi->ifp->mtu);
@@ -1336,7 +1336,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
* In Hello protocol, optional capability must have checked
* to prevent this T-bit enabled router be my neighbor.
*/
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Packet[DD]: Neighbor %s: T-bit on?",
inet_ntoa(nbr->router_id));
return;
@@ -1362,7 +1362,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
case NSM_Attempt:
case NSM_TwoWay:
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"Packet[DD]: Neighbor %s state is %s, packet discarded.",
inet_ntoa(nbr->router_id),
lookup_msg(ospf_nsm_state_msg, nbr->state, NULL));
@@ -1416,7 +1416,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
/* Reset I, leaving MS */
UNSET_FLAG(nbr->dd_flags, OSPF_DD_FLAG_I);
} else {
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Packet[DD]: Neighbor %s Negotiation fails.",
inet_ntoa(nbr->router_id));
break;
@@ -1438,7 +1438,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
&& IPV4_ADDR_SAME(&DR(oi),
&nbr->address.u.prefix4)) {
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"DR-neighbor[%s] is NOT opaque-capable; Opaque-LSAs cannot be reliably advertised in this network.",
inet_ntoa(nbr->router_id));
/* This situation is undesirable, but not a real
@@ -1474,7 +1474,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
/* Check Master/Slave bit mismatch */
if (IS_SET_DD_MS(dd->flags)
!= IS_SET_DD_MS(nbr->last_recv.flags)) {
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Packet[DD]: Neighbor %s MS-bit mismatch.",
inet_ntoa(nbr->router_id));
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_SeqNumberMismatch);
@@ -1499,7 +1499,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
/* Save the new options for debugging */
nbr->options = dd->options;
#endif /* ORIGINAL_CODING */
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Packet[DD]: Neighbor %s options mismatch.",
inet_ntoa(nbr->router_id));
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_SeqNumberMismatch);
@@ -1512,7 +1512,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
|| (!IS_SET_DD_MS(nbr->dd_flags)
&& ntohl(dd->dd_seqnum) != nbr->dd_seqnum + 1)) {
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"Packet[DD]: Neighbor %s sequence number mismatch.",
inet_ntoa(nbr->router_id));
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_SeqNumberMismatch);
@@ -1562,7 +1562,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_SeqNumberMismatch);
break;
default:
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Packet[DD]: Neighbor %s NSM illegal status %u.",
inet_ntoa(nbr->router_id), nbr->state);
break;
@@ -1589,7 +1589,7 @@ static void ospf_ls_req(struct ip *iph, struct ospf_header *ospfh,
nbr = ospf_nbr_lookup(oi, iph, ospfh);
if (nbr == NULL) {
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Link State Request: Unknown Neighbor %s.",
inet_ntoa(ospfh->router_id));
return;
@@ -1602,7 +1602,7 @@ static void ospf_ls_req(struct ip *iph, struct ospf_header *ospfh,
if (nbr->state != NSM_Exchange && nbr->state != NSM_Loading
&& nbr->state != NSM_Full) {
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"Link State Request received from %s: Neighbor state is %s, packet discarded.",
inet_ntoa(ospfh->router_id),
lookup_msg(ospf_nsm_state_msg, nbr->state, NULL));
@@ -1695,7 +1695,7 @@ static struct list *ospf_ls_upd_list_lsa(struct ospf_neighbor *nbr,
if (length > size) {
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"Link State Update: LSA length exceeds packet size.");
break;
}
@@ -1710,7 +1710,7 @@ static struct list *ospf_ls_upd_list_lsa(struct ospf_neighbor *nbr,
* chance to compress repeated messages in syslog on the
* other */
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"Link State Update: LSA checksum error %x/%x, ID=%s from: nbr %s, router ID %s, adv router %s",
sum, lsah->checksum, inet_ntoa(lsah->id),
inet_ntoa(nbr->src), inet_ntoa(nbr->router_id),
@@ -1720,7 +1720,7 @@ static struct list *ospf_ls_upd_list_lsa(struct ospf_neighbor *nbr,
/* Examine the LSA's LS type. */
if (lsah->type < OSPF_MIN_LSA || lsah->type >= OSPF_MAX_LSA) {
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Link State Update: Unknown LS type %d",
lsah->type);
continue;
@@ -1745,7 +1745,7 @@ static struct list *ospf_ls_upd_list_lsa(struct ospf_neighbor *nbr,
* the bit will be set in Type-9,10,11 LSAs
* only.
*/
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"LSA[Type%d:%s]: O-bit abuse?",
lsah->type, inet_ntoa(lsah->id));
continue;
@@ -1765,7 +1765,7 @@ static struct list *ospf_ls_upd_list_lsa(struct ospf_neighbor *nbr,
continue;
}
} else if (IS_OPAQUE_LSA(lsah->type)) {
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"LSA[Type%d:%s]: Opaque capability mismatch?",
lsah->type, inet_ntoa(lsah->id));
continue;
@@ -1836,7 +1836,7 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
/* Check neighbor. */
nbr = ospf_nbr_lookup(oi, iph, ospfh);
if (nbr == NULL) {
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Link State Update: Unknown Neighbor %s on int: %s",
inet_ntoa(ospfh->router_id), IF_NAME(oi));
return;
@@ -1948,7 +1948,7 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
char buf2[INET_ADDRSTRLEN];
char buf3[INET_ADDRSTRLEN];
- flog_err(OSPF_ERR_ROUTER_LSA_MISMATCH,
+ flog_err(EC_OSPF_ROUTER_LSA_MISMATCH,
"Incoming Router-LSA from %s with "
"Adv-ID[%s] != LS-ID[%s]",
inet_ntop(AF_INET, &ospfh->router_id,
@@ -1959,7 +1959,7 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
&lsa->data->adv_router,
buf3, INET_ADDRSTRLEN));
flog_err(
- OSPF_ERR_DOMAIN_CORRUPT,
+ EC_OSPF_DOMAIN_CORRUPT,
"OSPF domain compromised by attack or corruption. "
"Verify correct operation of -ALL- OSPF routers.");
DISCARD_LSA(lsa, 0);
@@ -2119,7 +2119,7 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
if (ospf_ls_request_lookup(nbr, lsa)) {
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_BadLSReq);
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"LSA[%s] instance exists on Link state request list",
dump_lsa_key(lsa));
@@ -2232,7 +2232,7 @@ static void ospf_ls_ack(struct ip *iph, struct ospf_header *ospfh,
nbr = ospf_nbr_lookup(oi, iph, ospfh);
if (nbr == NULL) {
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Link State Acknowledgment: Unknown Neighbor %s.",
inet_ntoa(ospfh->router_id));
return;
@@ -2303,14 +2303,14 @@ static struct stream *ospf_recv_packet(struct ospf *ospf, int fd,
ret = stream_recvmsg(ibuf, fd, &msgh, 0, OSPF_MAX_PACKET_SIZE + 1);
if (ret < 0) {
- flog_warn(OSPF_WARN_PACKET, "stream_recvmsg failed: %s",
+ flog_warn(EC_OSPF_PACKET, "stream_recvmsg failed: %s",
safe_strerror(errno));
return NULL;
}
if ((unsigned int)ret < sizeof(iph)) /* ret must be > 0 now */
{
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"ospf_recv_packet: discarding runt packet of length %d "
"(ip header size is %u)",
ret, (unsigned int)sizeof(iph));
@@ -2357,7 +2357,7 @@ static struct stream *ospf_recv_packet(struct ospf *ospf, int fd,
if (ret != ip_len) {
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"ospf_recv_packet read length mismatch: ip_len is %d, "
"but recvmsg returned %d",
ip_len, ret);
@@ -2464,7 +2464,7 @@ static int ospf_check_auth(struct ospf_interface *oi, struct ospf_header *ospfh)
if (OSPF_AUTH_NULL != (iface_auth_type = ospf_auth_type(oi))) {
if (IS_DEBUG_OSPF_PACKET(ospfh->type - 1, RECV))
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"interface %s: auth-type mismatch, local %s, rcvd Null",
IF_NAME(oi),
lookup_msg(ospf_auth_type_str,
@@ -2474,7 +2474,7 @@ static int ospf_check_auth(struct ospf_interface *oi, struct ospf_header *ospfh)
if (!ospf_check_sum(ospfh)) {
if (IS_DEBUG_OSPF_PACKET(ospfh->type - 1, RECV))
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"interface %s: Null auth OK, but checksum error, Router-ID %s",
IF_NAME(oi),
inet_ntoa(ospfh->router_id));
@@ -2486,7 +2486,7 @@ static int ospf_check_auth(struct ospf_interface *oi, struct ospf_header *ospfh)
!= (iface_auth_type = ospf_auth_type(oi))) {
if (IS_DEBUG_OSPF_PACKET(ospfh->type - 1, RECV))
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"interface %s: auth-type mismatch, local %s, rcvd Simple",
IF_NAME(oi),
lookup_msg(ospf_auth_type_str,
@@ -2496,7 +2496,7 @@ static int ospf_check_auth(struct ospf_interface *oi, struct ospf_header *ospfh)
if (memcmp(OSPF_IF_PARAM(oi, auth_simple), ospfh->u.auth_data,
OSPF_AUTH_SIMPLE_SIZE)) {
if (IS_DEBUG_OSPF_PACKET(ospfh->type - 1, RECV))
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"interface %s: Simple auth failed",
IF_NAME(oi));
return 0;
@@ -2504,7 +2504,7 @@ static int ospf_check_auth(struct ospf_interface *oi, struct ospf_header *ospfh)
if (!ospf_check_sum(ospfh)) {
if (IS_DEBUG_OSPF_PACKET(ospfh->type - 1, RECV))
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"interface %s: Simple auth OK, checksum error, Router-ID %s",
IF_NAME(oi),
inet_ntoa(ospfh->router_id));
@@ -2516,7 +2516,7 @@ static int ospf_check_auth(struct ospf_interface *oi, struct ospf_header *ospfh)
!= (iface_auth_type = ospf_auth_type(oi))) {
if (IS_DEBUG_OSPF_PACKET(ospfh->type - 1, RECV))
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"interface %s: auth-type mismatch, local %s, rcvd Cryptographic",
IF_NAME(oi),
lookup_msg(ospf_auth_type_str,
@@ -2526,7 +2526,7 @@ static int ospf_check_auth(struct ospf_interface *oi, struct ospf_header *ospfh)
if (ospfh->checksum) {
if (IS_DEBUG_OSPF_PACKET(ospfh->type - 1, RECV))
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"interface %s: OSPF header checksum is not 0",
IF_NAME(oi));
return 0;
@@ -2541,7 +2541,7 @@ static int ospf_check_auth(struct ospf_interface *oi, struct ospf_header *ospfh)
bug? */
!ospf_check_md5_digest(oi, ospfh)) {
if (IS_DEBUG_OSPF_PACKET(ospfh->type - 1, RECV))
- flog_warn(OSPF_WARN_MD5,
+ flog_warn(EC_OSPF_MD5,
"interface %s: MD5 auth failed",
IF_NAME(oi));
return 0;
@@ -2550,7 +2550,7 @@ static int ospf_check_auth(struct ospf_interface *oi, struct ospf_header *ospfh)
default:
if (IS_DEBUG_OSPF_PACKET(ospfh->type - 1, RECV))
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"interface %s: invalid packet auth-type (%02x)",
IF_NAME(oi), pkt_auth_type);
return 0;
@@ -2899,7 +2899,7 @@ static int ospf_verify_header(struct stream *ibuf, struct ospf_interface *oi,
{
/* Check Area ID. */
if (!ospf_check_area_id(oi, ospfh)) {
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"interface %s: ospf_read invalid Area ID %s.",
IF_NAME(oi), inet_ntoa(ospfh->area_id));
return -1;
@@ -2908,7 +2908,7 @@ static int ospf_verify_header(struct stream *ibuf, struct ospf_interface *oi,
/* Check network mask, Silently discarded. */
if (!ospf_check_network_mask(oi, iph->ip_src)) {
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"interface %s: ospf_read network address is not same [%s]",
IF_NAME(oi), inet_ntoa(iph->ip_src));
return -1;
@@ -3053,14 +3053,14 @@ int ospf_read(struct thread *thread)
*/
else if (oi->ifp != ifp) {
if (IS_DEBUG_OSPF_EVENT)
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"Packet from [%s] received on wrong link %s",
inet_ntoa(iph->ip_src), ifp->name);
return 0;
} else if (oi->state == ISM_Down) {
char buf[2][INET_ADDRSTRLEN];
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"Ignoring packet from %s to %s received on interface that is "
"down [%s]; interface flags are %s",
inet_ntop(AF_INET, &iph->ip_src, buf[0],
@@ -3086,7 +3086,7 @@ int ospf_read(struct thread *thread)
if (iph->ip_dst.s_addr == htonl(OSPF_ALLDROUTERS)
&& (oi->state != ISM_DR && oi->state != ISM_Backup)) {
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"Dropping packet for AllDRouters from [%s] via [%s] (ISM: %s)",
inet_ntoa(iph->ip_src), IF_NAME(oi),
lookup_msg(ospf_ism_state_msg, oi->state, NULL));
@@ -3149,7 +3149,7 @@ int ospf_read(struct thread *thread)
ospf_ls_ack(iph, ospfh, ibuf, oi, length);
break;
default:
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"interface %s: OSPF packet header type %d is illegal",
IF_NAME(oi), ospfh->type);
break;
@@ -3882,7 +3882,7 @@ static struct ospf_packet *ospf_ls_upd_packet_new(struct list *update,
> ospf_packet_max(oi)) {
if (!warned) {
flog_warn(
- OSPF_WARN_LARGE_LSA,
+ EC_OSPF_LARGE_LSA,
"ospf_ls_upd_packet_new: oversized LSA encountered!"
"will need to fragment. Not optimal. Try divide up"
" your network with areas. Use 'debug ospf packet send'"
@@ -3910,7 +3910,7 @@ static struct ospf_packet *ospf_ls_upd_packet_new(struct list *update,
size = oi->ifp->mtu;
if (size > OSPF_MAX_PACKET_SIZE) {
- flog_warn(OSPF_WARN_LARGE_LSA,
+ flog_warn(EC_OSPF_LARGE_LSA,
"ospf_ls_upd_packet_new: oversized LSA id:%s too big,"
" %d bytes, packet size %ld, dropping it completely."
" OSPF routing is broken!",
@@ -4072,10 +4072,10 @@ void ospf_ls_upd_send(struct ospf_neighbor *nbr, struct list *update, int flag,
if (oi->type == OSPF_IFTYPE_NBMA) {
if (flag == OSPF_SEND_PACKET_INDIRECT)
flog_warn(
- OSPF_WARN_PACKET,
+ EC_OSPF_PACKET,
"* LS-Update is directly sent on NBMA network.");
if (IPV4_ADDR_SAME(&oi->address->u.prefix4, &p.prefix))
- flog_warn(OSPF_WARN_PACKET,
+ flog_warn(EC_OSPF_PACKET,
"* LS-Update is sent to myself.");
}
diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c
index 974822ba8..e95fc43aa 100644
--- a/ospfd/ospf_ri.c
+++ b/ospfd/ospf_ri.c
@@ -187,7 +187,7 @@ static int ospf_router_info_register(uint8_t scope)
if (rc != 0) {
flog_warn(
- OSPF_WARN_OPAQUE_REGISTRATION,
+ EC_OSPF_OPAQUE_REGISTRATION,
"ospf_router_info_init: Failed to register functions");
return rc;
}
@@ -829,7 +829,7 @@ static int ospf_router_info_lsa_originate1(void *arg)
/* Install this LSA into LSDB. */
if (ospf_lsa_install(top, NULL /*oi */, new) == NULL) {
flog_warn(
- OSPF_WARN_LSA_INSTALL_FAILURE,
+ EC_OSPF_LSA_INSTALL_FAILURE,
"ospf_router_info_lsa_originate1: ospf_lsa_install() ?");
ospf_lsa_unlock(&new);
return rc;
@@ -879,7 +879,7 @@ static int ospf_router_info_lsa_originate(void *arg)
} else {
if (!is_mandated_params_set(OspfRI))
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_router_info_lsa_originate: lacks mandated ROUTER INFORMATION parameters");
/* Ok, let's try to originate an LSA */
@@ -911,7 +911,7 @@ static struct ospf_lsa *ospf_router_info_lsa_refresh(struct ospf_lsa *lsa)
/* Verify that the Router Information ID is supported */
if (GET_OPAQUE_ID(ntohl(lsa->data->id.s_addr)) != 0) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_router_info_lsa_refresh: Unsupported Router Information ID");
return NULL;
}
@@ -932,7 +932,7 @@ 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) {
- flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE,
+ flog_warn(EC_OSPF_LSA_INSTALL_FAILURE,
"ospf_router_info_lsa_refresh: ospf_lsa_install() ?");
ospf_lsa_unlock(&new);
return new;
@@ -982,7 +982,7 @@ static void ospf_router_info_lsa_schedule(enum lsa_opcode opcode)
top = ospf_lookup_by_vrf_id(VRF_DEFAULT);
if ((OspfRI.scope == OSPF_OPAQUE_AREA_LSA) && (OspfRI.area == NULL)) {
flog_warn(
- OSPF_WARN_LSA,
+ EC_OSPF_LSA,
"ospf_router_info_lsa_schedule(): Router Info is Area scope flooding but area is not set");
OspfRI.area = ospf_area_lookup_by_area_id(top, OspfRI.area_id);
}
@@ -1023,7 +1023,7 @@ static int ospf_router_info_lsa_update(struct ospf_lsa *lsa)
/* Sanity Check */
if (lsa == NULL) {
- flog_warn(OSPF_WARN_LSA, "OSPF-RI (%s): Abort! LSA is NULL",
+ flog_warn(EC_OSPF_LSA, "OSPF-RI (%s): Abort! LSA is NULL",
__func__);
return -1;
}
@@ -1449,7 +1449,7 @@ DEFUN (router_info,
vty_out(vty,
"%% Unable to register Router Information callbacks.");
flog_err(
- OSPF_ERR_INIT_FAIL,
+ EC_OSPF_INIT_FAIL,
"Unable to register Router Information callbacks. Abort!");
return CMD_WARNING_CONFIG_FAILED;
}
diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c
index d4513eebd..54009639f 100644
--- a/ospfd/ospf_routemap.c
+++ b/ospfd/ospf_routemap.c
@@ -393,7 +393,7 @@ static void *route_set_metric_compile(const char *arg)
metric->type = metric_absolute;
if (strmatch(arg, "+rtt") || strmatch(arg, "-rtt")) {
- flog_warn(OSPF_WARN_SET_METRIC_PLUS,
+ flog_warn(EC_OSPF_SET_METRIC_PLUS,
"OSPF does not support 'set metric +rtt / -rtt'");
return metric;
}
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c
index 41bf0a410..7896fb632 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -860,7 +860,7 @@ static void ospf_spf_next(struct vertex *v, struct ospf *ospf,
zlog_debug("found the LSA");
break;
default:
- flog_warn(OSPF_WARN_LSA,
+ flog_warn(EC_OSPF_LSA,
"Invalid LSA link type %d", type);
continue;
}
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c
index 17aa10ba0..8a6c6570e 100644
--- a/ospfd/ospf_sr.c
+++ b/ospfd/ospf_sr.c
@@ -821,7 +821,7 @@ static struct sr_prefix *get_ext_prefix_sid(struct tlv_header *tlvh)
case EXT_SUBTLV_PREFIX_SID:
psid = (struct ext_subtlv_prefix_sid *)sub_tlvh;
if (psid->algorithm != SR_ALGORITHM_SPF) {
- flog_err(OSPF_ERR_INVALID_ALGORITHM,
+ flog_err(EC_OSPF_INVALID_ALGORITHM,
"SR (%s): Unsupported Algorithm",
__func__);
XFREE(MTYPE_OSPF_SR_PARAMS, srp);
@@ -1102,7 +1102,7 @@ void ospf_sr_ri_lsa_update(struct ospf_lsa *lsa)
return;
if (OspfSR.neighbors == NULL) {
- flog_err(OSPF_ERR_SR_INVALID_DB,
+ flog_err(EC_OSPF_SR_INVALID_DB,
"SR (%s): Abort! no valid SR DataBase", __func__);
return;
}
@@ -1113,14 +1113,14 @@ void ospf_sr_ri_lsa_update(struct ospf_lsa *lsa)
/* Sanity check */
if (srn == NULL) {
- flog_err(OSPF_ERR_SR_NODE_CREATE,
+ flog_err(EC_OSPF_SR_NODE_CREATE,
"SR (%s): Abort! can't create SR node in hash table",
__func__);
return;
}
if ((srn->instance != 0) && (srn->instance != ntohl(lsah->id.s_addr))) {
- flog_err(OSPF_ERR_SR_INVALID_LSA_ID,
+ flog_err(EC_OSPF_SR_INVALID_LSA_ID,
"SR (%s): Abort! Wrong "
"LSA ID 4.0.0.%u for SR node %s/%u",
__func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)),
@@ -1167,7 +1167,7 @@ void ospf_sr_ri_lsa_update(struct ospf_lsa *lsa)
/* Check that we collect mandatory parameters */
if (srn->algo[0] == SR_ALGORITHM_UNSET || srgb.range_size == 0
|| srgb.lower_bound == 0) {
- flog_err(OSPF_ERR_SR_NODE_CREATE,
+ flog_err(EC_OSPF_SR_NODE_CREATE,
"SR (%s): Missing mandatory parameters. Abort!",
__func__);
hash_release(OspfSR.neighbors, &(srn->adv_router));
@@ -1214,7 +1214,7 @@ void ospf_sr_ri_lsa_delete(struct ospf_lsa *lsa)
/* Sanity check */
if (OspfSR.neighbors == NULL) {
- flog_err(OSPF_ERR_SR_INVALID_DB,
+ flog_err(EC_OSPF_SR_INVALID_DB,
"SR (%s): Abort! no valid SR Data Base", __func__);
return;
}
@@ -1224,7 +1224,7 @@ void ospf_sr_ri_lsa_delete(struct ospf_lsa *lsa)
/* Sanity check */
if (srn == NULL) {
- flog_err(OSPF_ERR_SR_NODE_CREATE,
+ flog_err(EC_OSPF_SR_NODE_CREATE,
"SR (%s): Abort! no entry in SRDB for SR Node %s",
__func__, inet_ntoa(lsah->adv_router));
return;
@@ -1232,7 +1232,7 @@ void ospf_sr_ri_lsa_delete(struct ospf_lsa *lsa)
if ((srn->instance != 0) && (srn->instance != ntohl(lsah->id.s_addr))) {
flog_err(
- OSPF_ERR_SR_INVALID_LSA_ID,
+ EC_OSPF_SR_INVALID_LSA_ID,
"SR (%s): Abort! Wrong LSA ID 4.0.0.%u for SR node %s",
__func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)),
inet_ntoa(lsah->adv_router));
@@ -1261,7 +1261,7 @@ void ospf_sr_ext_link_lsa_update(struct ospf_lsa *lsa)
/* Sanity check */
if (OspfSR.neighbors == NULL) {
- flog_err(OSPF_ERR_SR_INVALID_DB,
+ flog_err(EC_OSPF_SR_INVALID_DB,
"SR (%s): Abort! no valid SR DataBase", __func__);
return;
}
@@ -1273,7 +1273,7 @@ void ospf_sr_ext_link_lsa_update(struct ospf_lsa *lsa)
/* Sanity check */
if (srn == NULL) {
- flog_err(OSPF_ERR_SR_NODE_CREATE,
+ flog_err(EC_OSPF_SR_NODE_CREATE,
"SR (%s): Abort! can't create SR node in hash table",
__func__);
return;
@@ -1313,7 +1313,7 @@ void ospf_sr_ext_link_lsa_delete(struct ospf_lsa *lsa)
/* Sanity check */
if (OspfSR.neighbors == NULL) {
- flog_err(OSPF_ERR_SR_INVALID_DB,
+ flog_err(EC_OSPF_SR_INVALID_DB,
"SR (%s): Abort! no valid SR DataBase", __func__);
return;
}
@@ -1327,7 +1327,7 @@ void ospf_sr_ext_link_lsa_delete(struct ospf_lsa *lsa)
* processing Router Information LSA deletion
*/
if (srn == NULL) {
- flog_err(OSPF_ERR_SR_INVALID_DB,
+ flog_err(EC_OSPF_SR_INVALID_DB,
"SR (%s): Stop! no entry in SRDB for SR Node %s",
__func__, inet_ntoa(lsah->adv_router));
return;
@@ -1345,7 +1345,7 @@ void ospf_sr_ext_link_lsa_delete(struct ospf_lsa *lsa)
listnode_delete(srn->ext_link, srl);
XFREE(MTYPE_OSPF_SR_PARAMS, srl);
} else {
- flog_err(OSPF_ERR_SR_INVALID_DB,
+ flog_err(EC_OSPF_SR_INVALID_DB,
"SR (%s): Didn't found corresponding SR Link 8.0.0.%u "
"for SR Node %s",
__func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)),
@@ -1372,7 +1372,7 @@ void ospf_sr_ext_prefix_lsa_update(struct ospf_lsa *lsa)
/* Sanity check */
if (OspfSR.neighbors == NULL) {
- flog_err(OSPF_ERR_SR_INVALID_DB,
+ flog_err(EC_OSPF_SR_INVALID_DB,
"SR (%s): Abort! no valid SR DataBase", __func__);
return;
}
@@ -1384,7 +1384,7 @@ void ospf_sr_ext_prefix_lsa_update(struct ospf_lsa *lsa)
/* Sanity check */
if (srn == NULL) {
- flog_err(OSPF_ERR_SR_NODE_CREATE,
+ flog_err(EC_OSPF_SR_NODE_CREATE,
"SR (%s): Abort! can't create SR node in hash table",
__func__);
return;
@@ -1425,7 +1425,7 @@ void ospf_sr_ext_prefix_lsa_delete(struct ospf_lsa *lsa)
/* Sanity check */
if (OspfSR.neighbors == NULL) {
- flog_err(OSPF_ERR_SR_INVALID_DB,
+ flog_err(EC_OSPF_SR_INVALID_DB,
"SR (%s): Abort! no valid SR DataBase", __func__);
return;
}
@@ -1439,7 +1439,7 @@ void ospf_sr_ext_prefix_lsa_delete(struct ospf_lsa *lsa)
* processing Router Information LSA deletion
*/
if (srn == NULL) {
- flog_err(OSPF_ERR_SR_INVALID_DB,
+ flog_err(EC_OSPF_SR_INVALID_DB,
"SR (%s): Stop! no entry in SRDB for SR Node %s",
__func__, inet_ntoa(lsah->adv_router));
return;
@@ -1457,7 +1457,7 @@ void ospf_sr_ext_prefix_lsa_delete(struct ospf_lsa *lsa)
XFREE(MTYPE_OSPF_SR_PARAMS, srp);
} else {
flog_err(
- OSPF_ERR_SR_INVALID_DB,
+ EC_OSPF_SR_INVALID_DB,
"SR (%s): Didn't found corresponding SR Prefix 7.0.0.%u for SR Node %s",
__func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)),
inet_ntoa(lsah->adv_router));
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index f3be77195..f45682c77 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -104,7 +104,7 @@ int ospf_mpls_te_init(void)
NULL /* ospf_mpls_te_del_lsa_hook */);
if (rc != 0) {
flog_warn(
- OSPF_WARN_OPAQUE_REGISTRATION,
+ EC_OSPF_OPAQUE_REGISTRATION,
"ospf_mpls_te_init: Failed to register Traffic Engineering functions");
return rc;
}
@@ -142,7 +142,7 @@ static int ospf_mpls_te_register(enum inter_as_mode mode)
if (rc != 0) {
flog_warn(
- OSPF_WARN_OPAQUE_REGISTRATION,
+ EC_OSPF_OPAQUE_REGISTRATION,
"ospf_router_info_init: Failed to register Inter-AS functions");
return rc;
}
@@ -820,19 +820,19 @@ static int is_mandated_params_set(struct mpls_te_link *lp)
if (ntohs(OspfMplsTE.router_addr.header.type) == 0) {
flog_warn(
- OSPF_WARN_TE_UNEXPECTED,
+ EC_OSPF_TE_UNEXPECTED,
"MPLS-TE(is_mandated_params_set) Missing Router Address");
return rc;
}
if (ntohs(lp->link_type.header.type) == 0) {
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
+ flog_warn(EC_OSPF_TE_UNEXPECTED,
"MPLS-TE(is_mandated_params_set) Missing Link Type");
return rc;
}
if (!IS_INTER_AS(lp->type) && (ntohs(lp->link_id.header.type) == 0)) {
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
+ flog_warn(EC_OSPF_TE_UNEXPECTED,
"MPLS-TE(is_mandated_params_set) Missing Link ID");
return rc;
}
@@ -925,7 +925,7 @@ void ospf_mpls_te_update_if(struct interface *ifp)
/* Get Link context from interface */
if ((lp = lookup_linkparams_by_ifp(ifp)) == NULL) {
flog_warn(
- OSPF_WARN_TE_UNEXPECTED,
+ EC_OSPF_TE_UNEXPECTED,
"OSPF MPLS-TE Update: Did not find Link Parameters context for interface %s",
ifp->name);
return;
@@ -970,7 +970,7 @@ static void ospf_mpls_te_ism_change(struct ospf_interface *oi, int old_state)
if ((lp = lookup_linkparams_by_ifp(oi->ifp)) == NULL) {
flog_warn(
- OSPF_WARN_TE_UNEXPECTED,
+ EC_OSPF_TE_UNEXPECTED,
"ospf_mpls_te_ism_change: Cannot get linkparams from OI(%s)?",
IF_NAME(oi));
return;
@@ -978,7 +978,7 @@ static void ospf_mpls_te_ism_change(struct ospf_interface *oi, int old_state)
if (oi->area == NULL || oi->area->ospf == NULL) {
flog_warn(
- OSPF_WARN_TE_UNEXPECTED,
+ EC_OSPF_TE_UNEXPECTED,
"ospf_mpls_te_ism_change: Cannot refer to OSPF from OI(%s)?",
IF_NAME(oi));
return;
@@ -989,7 +989,7 @@ static void ospf_mpls_te_ism_change(struct ospf_interface *oi, int old_state)
|| (lp->area != NULL && oi->area == NULL)) {
/* How should we consider this case? */
flog_warn(
- OSPF_WARN_TE_UNEXPECTED,
+ EC_OSPF_TE_UNEXPECTED,
"MPLS-TE: Area for OI(%s) has changed to [%s], flush previous LSAs",
IF_NAME(oi),
oi->area ? inet_ntoa(oi->area->area_id) : "N/A");
@@ -1224,14 +1224,14 @@ static int ospf_mpls_te_lsa_originate1(struct ospf_area *area,
new = ospf_mpls_te_lsa_new(area->ospf, area, lp);
if (new == NULL) {
flog_warn(
- OSPF_WARN_TE_UNEXPECTED,
+ EC_OSPF_TE_UNEXPECTED,
"ospf_mpls_te_lsa_originate1: ospf_mpls_te_lsa_new() ?");
return rc;
}
/* Install this LSA into LSDB. */
if (ospf_lsa_install(area->ospf, NULL /*oi*/, new) == NULL) {
- flog_warn(OSPF_WARN_LSA_INSTALL_FAILURE,
+ flog_warn(EC_OSPF_LSA_INSTALL_FAILURE,
"ospf_mpls_te_lsa_originate1: ospf_lsa_install() ?");
ospf_lsa_unlock(&new);
return rc;
@@ -1326,7 +1326,7 @@ static int ospf_mpls_te_lsa_originate2(struct ospf *top,
new = ospf_mpls_te_lsa_new(top, NULL, lp);
if (new == NULL) {
flog_warn(
- OSPF_WARN_LSA_UNEXPECTED,
+ EC_OSPF_LSA_UNEXPECTED,
"ospf_mpls_te_lsa_originate2: ospf_router_info_lsa_new() ?");
return rc;
}
@@ -1334,7 +1334,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_INSTALL_FAILURE,
+ flog_warn(EC_OSPF_LSA_INSTALL_FAILURE,
"ospf_mpls_te_lsa_originate2: ospf_lsa_install() ?");
ospf_lsa_unlock(&new);
return rc;
@@ -1390,7 +1390,7 @@ static int ospf_mpls_te_lsa_originate_as(void *arg)
if (!is_mandated_params_set(lp)) {
flog_warn(
- OSPF_WARN_TE_UNEXPECTED,
+ EC_OSPF_TE_UNEXPECTED,
"ospf_mpls_te_lsa_originate_as: Link(%s) lacks some mandated MPLS-TE parameters.",
lp->ifp ? lp->ifp->name : "?");
continue;
@@ -1437,7 +1437,7 @@ static struct ospf_lsa *ospf_mpls_te_lsa_refresh(struct ospf_lsa *lsa)
/* At first, resolve lsa/lp relationship. */
if ((lp = lookup_linkparams_by_instance(lsa)) == NULL) {
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
+ flog_warn(EC_OSPF_TE_UNEXPECTED,
"ospf_mpls_te_lsa_refresh: Invalid parameter?");
lsa->data->ls_age =
htons(OSPF_LSA_MAXAGE); /* Flush it anyway. */
@@ -1448,7 +1448,7 @@ static struct ospf_lsa *ospf_mpls_te_lsa_refresh(struct ospf_lsa *lsa)
/* Check if lp was not disable in the interval */
if (!CHECK_FLAG(lp->flags, LPFLG_LSA_ACTIVE)) {
flog_warn(
- OSPF_WARN_TE_UNEXPECTED,
+ EC_OSPF_TE_UNEXPECTED,
"ospf_mpls_te_lsa_refresh: lp was disabled: Flush it!");
lsa->data->ls_age =
htons(OSPF_LSA_MAXAGE); /* Flush it anyway. */
@@ -1464,7 +1464,7 @@ static struct ospf_lsa *ospf_mpls_te_lsa_refresh(struct ospf_lsa *lsa)
/* Create new Opaque-LSA/MPLS-TE instance. */
new = ospf_mpls_te_lsa_new(top, area, lp);
if (new == NULL) {
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
+ flog_warn(EC_OSPF_TE_UNEXPECTED,
"ospf_mpls_te_lsa_refresh: ospf_mpls_te_lsa_new() ?");
return NULL;
}
@@ -1478,7 +1478,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_LSA_INSTALL_FAILURE,
+ flog_warn(EC_OSPF_LSA_INSTALL_FAILURE,
"ospf_mpls_te_lsa_refresh: ospf_lsa_install() ?");
ospf_lsa_unlock(&new);
return NULL;
@@ -1534,7 +1534,7 @@ void ospf_mpls_te_lsa_schedule(struct mpls_te_link *lp, enum lsa_opcode opcode)
/* Unable to set the area context. Abort! */
if (lp->area == NULL) {
flog_warn(
- OSPF_WARN_TE_UNEXPECTED,
+ EC_OSPF_TE_UNEXPECTED,
"MPLS-TE(ospf_mpls_te_lsa_schedule) Area context is null. Abort !");
return;
}
@@ -1577,7 +1577,7 @@ void ospf_mpls_te_lsa_schedule(struct mpls_te_link *lp, enum lsa_opcode opcode)
ospf_opaque_lsa_flush_schedule(&lsa);
break;
default:
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
+ flog_warn(EC_OSPF_TE_UNEXPECTED,
"ospf_mpls_te_lsa_schedule: Unknown opcode (%u)",
opcode);
break;