]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospfd: Modify ospf_abr.c to use new error-code subsystem
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 21 Aug 2018 12:14:32 +0000 (08:14 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 6 Sep 2018 20:50:58 +0000 (20:50 +0000)
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospfd/ospf_abr.c
ospfd/ospf_errors.c
ospfd/ospf_errors.h

index 0ff9d0da51eb212b70c6434b44f774cbe9d63371..8cd61a4a9d343a1f547a1459efd0ab67615cd4db 100644 (file)
@@ -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;
                }
index 25c211cf60e85114b27512230a59a36e378490d6..0eb68755c2196fd535e57c3bbc7d4bd114f39e42 100644 (file)
@@ -91,6 +91,12 @@ static struct log_ref ferr_ospf_warn[] = {
                .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,
+               .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,
        }
index d6f2eb753c32f7a23227da9512790e558ec59a3c..33fbec8889cd78203044ce96f9556a38e4307459 100644 (file)
@@ -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);