]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/redistribute.c
isisd: implement the 'lsp-too-large' notification
[mirror_frr.git] / zebra / redistribute.c
index 640d58e17e83595722cf752a009a9cb58a4aa5f3..f48fc6addb6069b05a5199ee29c7e1ef76e5d807 100644 (file)
@@ -43,6 +43,7 @@
 #include "zebra/zapi_msg.h"
 #include "zebra/zebra_memory.h"
 #include "zebra/zebra_vxlan.h"
+#include "zebra/zebra_errors.h"
 
 #define ZEBRA_PTM_SUPPORT
 
@@ -166,7 +167,8 @@ void redistribute_update(const struct prefix *p, const struct prefix *src_p,
 
        afi = family2afi(p->family);
        if (!afi) {
-               zlog_warn("%s: Unknown AFI/SAFI prefix received\n",
+               flog_warn(EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
+                         "%s: Unknown AFI/SAFI prefix received\n",
                          __FUNCTION__);
                return;
        }
@@ -236,7 +238,8 @@ void redistribute_delete(const struct prefix *p, const struct prefix *src_p,
 
        afi = family2afi(p->family);
        if (!afi) {
-               zlog_warn("%s: Unknown AFI/SAFI prefix received\n",
+               flog_warn(EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
+                         "%s: Unknown AFI/SAFI prefix received\n",
                          __FUNCTION__);
                return;
        }
@@ -275,14 +278,15 @@ void zebra_redistribute_add(ZAPI_HANDLER_ARGS)
                        zebra_route_string(type), zvrf_id(zvrf), instance);
 
        if (afi == 0 || afi >= AFI_MAX) {
-               zlog_warn("%s: Specified afi %d does not exist",
+               flog_warn(EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
+                         "%s: Specified afi %d does not exist",
                          __PRETTY_FUNCTION__, afi);
                return;
        }
 
        if (type == 0 || type >= ZEBRA_ROUTE_MAX) {
-               zlog_warn("%s: Specified Route Type %d does not exist",
-                         __PRETTY_FUNCTION__, type);
+               zlog_debug("%s: Specified Route Type %d does not exist",
+                          __PRETTY_FUNCTION__, type);
                return;
        }
 
@@ -321,14 +325,15 @@ void zebra_redistribute_delete(ZAPI_HANDLER_ARGS)
        STREAM_GETW(msg, instance);
 
        if (afi == 0 || afi >= AFI_MAX) {
-               zlog_warn("%s: Specified afi %d does not exist",
+               flog_warn(EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
+                         "%s: Specified afi %d does not exist",
                          __PRETTY_FUNCTION__, afi);
                return;
        }
 
        if (type == 0 || type >= ZEBRA_ROUTE_MAX) {
-               zlog_warn("%s: Specified Route Type %d does not exist",
-                         __PRETTY_FUNCTION__, type);
+               zlog_debug("%s: Specified Route Type %d does not exist",
+                          __PRETTY_FUNCTION__, type);
                return;
        }
 
@@ -444,7 +449,8 @@ void zebra_interface_address_add_update(struct interface *ifp,
        }
 
        if (!CHECK_FLAG(ifc->conf, ZEBRA_IFC_REAL))
-               zlog_warn(
+               flog_warn(
+                       EC_ZEBRA_ADVERTISING_UNUSABLE_ADDR,
                        "WARNING: advertising address to clients that is not yet usable.");
 
        zebra_vxlan_add_del_gw_macip(ifp, ifc->address, 1);