]> git.proxmox.com Git - mirror_frr.git/commitdiff
ospfd: Add OSPF_WARN_OPAQUE_REGISTRATION
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 20 Aug 2018 23:47:59 +0000 (19:47 -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_apiserver.c
ospfd/ospf_errors.c
ospfd/ospf_errors.h
ospfd/ospf_ext.c
ospfd/ospf_ri.c
ospfd/ospf_te.c

index 57e0ae5ec95f83c95b3323c119483d103dd782b7..e37f87db9f803116432f5bc84114907a5f5d42f7 100644 (file)
@@ -54,6 +54,7 @@
 #include "ospfd/ospf_route.h"
 #include "ospfd/ospf_ase.h"
 #include "ospfd/ospf_zebra.h"
+#include "ospfd/ospf_errors.h"
 
 #include "ospfd/ospf_api.h"
 #include "ospfd/ospf_apiserver.h"
@@ -152,8 +153,8 @@ int ospf_apiserver_init(void)
                NULL,             /* ospf_apiserver_lsa_refresher */
                ospf_apiserver_lsa_update, ospf_apiserver_lsa_delete);
        if (rc != 0) {
-               zlog_warn(
-                       "ospf_apiserver_init: Failed to register opaque type [0/0]");
+               flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
+                         "ospf_apiserver_init: Failed to register opaque type [0/0]");
        }
 
        rc = 0;
@@ -867,7 +868,8 @@ int ospf_apiserver_register_opaque_type(struct ospf_apiserver *apiserv,
                NULL /* ospf_apiserver_lsa_delete */);
 
        if (rc != 0) {
-               zlog_warn("Failed to register opaque type [%d/%d]", lsa_type,
+               flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
+                         "Failed to register opaque type [%d/%d]", lsa_type,
                          opaque_type);
                return OSPF_API_OPAQUETYPEINUSE;
        }
index 7c885a8cd09b85c58563fc81eb2958ec534f00cd..87760b3a34f251fb18190ea13112d21ae77483af 100644 (file)
@@ -61,6 +61,12 @@ static struct log_ref ferr_ospf_warn[] = {
                .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,
+               .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 = END_FERR,
        }
index 5d7531687d2f37eba2958fc62313a7597dbbc139..09b368fef326817709515c56ca82c9f0f455f129 100644 (file)
@@ -38,6 +38,7 @@ enum ospf_log_refs {
        OSPF_WARN_LARGE_LSA,
        OSPF_WARN_LSA_UNEXPECTED,
        OSPF_WARN_LSA,
+       OSPF_WARN_OPAQUE_REGISTRATION,
 };
 
 extern void ospf_error_init(void);
index 25b27d442b688ce251180f645b386ae7d8ff1965..8ddf7db9d10e6698cca2dd67fe1e4441c86ad001 100644 (file)
@@ -62,6 +62,7 @@
 #include "ospfd/ospf_zebra.h"
 #include "ospfd/ospf_sr.h"
 #include "ospfd/ospf_ext.h"
+#include "ospfd/ospf_errors.h"
 
 /* Following structure are internal use only. */
 
@@ -136,7 +137,8 @@ int ospf_ext_init(void)
                NULL);                       /* del_lsa_hook */
 
        if (rc != 0) {
-               zlog_warn("EXT (%s): Failed to register Extended Link LSA",
+               flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
+                         "EXT (%s): Failed to register Extended Link LSA",
                          __func__);
                return rc;
        }
@@ -157,7 +159,8 @@ int ospf_ext_init(void)
                ospf_ext_pref_lsa_update,    /* new_lsa_hook */
                NULL);                       /* del_lsa_hook */
        if (rc != 0) {
-               zlog_warn("EXT (%s): Failed to register Extended Prefix LSA",
+               flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
+                         "EXT (%s): Failed to register Extended Prefix LSA",
                          __func__);
                return rc;
        }
index 4f6e1be0f469bebe2d6775416fa281d7762d5e64..c5e0cd3873371e3852d6a7afed855ef7a50bfd9c 100644 (file)
@@ -57,6 +57,7 @@
 #include "ospfd/ospf_zebra.h"
 #include "ospfd/ospf_sr.h"
 #include "ospfd/ospf_ri.h"
+#include "ospfd/ospf_errors.h"
 
 /* Store Router Information PCE TLV and SubTLV in network byte order. */
 struct ospf_pce_info {
@@ -185,8 +186,8 @@ static int ospf_router_info_register(uint8_t scope)
                NULL); /* del_lsa_hook */
 
        if (rc != 0) {
-               zlog_warn(
-                       "ospf_router_info_init: Failed to register functions");
+               flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
+                         "ospf_router_info_init: Failed to register functions");
                return rc;
        }
 
index f8722f9c868aa67cc92bd7ff60008cebc5d1105e..84288931150d31e73c00ed724b5cd04bea854cad 100644 (file)
@@ -61,6 +61,7 @@
 #include "ospfd/ospf_zebra.h"
 #include "ospfd/ospf_te.h"
 #include "ospfd/ospf_vty.h"
+#include "ospfd/ospf_errors.h"
 
 /*
  * Global variable to manage Opaque-LSA/MPLS-TE on this node.
@@ -102,8 +103,8 @@ int ospf_mpls_te_init(void)
                ospf_mpls_te_lsa_refresh, NULL, /* ospf_mpls_te_new_lsa_hook */
                NULL /* ospf_mpls_te_del_lsa_hook */);
        if (rc != 0) {
-               zlog_warn(
-                       "ospf_mpls_te_init: Failed to register Traffic Engineering functions");
+               flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
+                         "ospf_mpls_te_init: Failed to register Traffic Engineering functions");
                return rc;
        }
 
@@ -139,8 +140,8 @@ static int ospf_mpls_te_register(enum inter_as_mode mode)
                                          ospf_mpls_te_lsa_refresh, NULL, NULL);
 
        if (rc != 0) {
-               zlog_warn(
-                       "ospf_router_info_init: Failed to register Inter-AS functions");
+               flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
+                         "ospf_router_info_init: Failed to register Inter-AS functions");
                return rc;
        }