summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-08-21 14:14:32 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-09-06 22:50:58 +0200
commit733fb9177f430e1db01397cce29a0345a2dcb881 (patch)
tree02247fa671c5e03acd12816256251589599cca1b
parentospfd: Convert ospf_ext.c to use new error-code subsystem (diff)
downloadfrr-733fb9177f430e1db01397cce29a0345a2dcb881.tar.xz
frr-733fb9177f430e1db01397cce29a0345a2dcb881.zip
ospfd: Modify ospf_abr.c to use new error-code subsystem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--ospfd/ospf_abr.c10
-rw-r--r--ospfd/ospf_errors.c6
-rw-r--r--ospfd/ospf_errors.h1
3 files changed, 14 insertions, 3 deletions
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 0ff9d0da5..8cd61a4a9 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -49,6 +49,7 @@
#include "ospfd/ospf_ase.h"
#include "ospfd/ospf_zebra.h"
#include "ospfd/ospf_dump.h"
+#include "ospfd/ospf_errors.h"
static struct ospf_area_range *ospf_area_range_new(struct prefix_ipv4 *p)
{
@@ -742,7 +743,8 @@ void ospf_abr_announce_network_to_area(struct prefix_ipv4 *p, uint32_t cost,
prefix2str((struct prefix *)p, buf,
sizeof(buf));
- zlog_warn("%s: Could not refresh %s to %s",
+ flog_warn(OSPF_WARN_LSA_MISSING,
+ "%s: Could not refresh %s to %s",
__func__, buf,
inet_ntoa(area->area_id));
return;
@@ -764,7 +766,8 @@ 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));
- zlog_warn("%s: Could not originate %s to %s", __func__,
+ flog_warn(OSPF_WARN_LSA_MISSING,
+ "%s: Could not originate %s to %s", __func__,
buf, inet_ntoa(area->area_id));
return;
}
@@ -1132,7 +1135,8 @@ 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));
- zlog_warn("%s: Could not refresh/originate %s to %s",
+ flog_warn(OSPF_WARN_LSA_MISSING,
+ "%s: Could not refresh/originate %s to %s",
__func__, buf, inet_ntoa(area->area_id));
return;
}
diff --git a/ospfd/ospf_errors.c b/ospfd/ospf_errors.c
index 25c211cf6..0eb68755c 100644
--- a/ospfd/ospf_errors.c
+++ b/ospfd/ospf_errors.c
@@ -92,6 +92,12 @@ static struct log_ref ferr_ospf_warn[] = {
.suggestion = "Gather data from this machine and it's peer and open an Issue",
},
{
+ .code = OSPF_WARN_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 = END_FERR,
}
};
diff --git a/ospfd/ospf_errors.h b/ospfd/ospf_errors.h
index d6f2eb753..33fbec888 100644
--- a/ospfd/ospf_errors.h
+++ b/ospfd/ospf_errors.h
@@ -43,6 +43,7 @@ enum ospf_log_refs {
OSPF_WARN_LSA_INSTALL_FAILURE,
OSPF_WARN_LSA_NULL,
OSPF_WARN_EXT_LSA_UNEXPECTED,
+ OSPF_WARN_LSA_MISSING,
};
extern void ospf_error_init(void);