]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Fix unprotected debugs to warns and fix
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 12 May 2016 01:31:30 +0000 (21:31 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 12 May 2016 17:20:07 +0000 (13:20 -0400)
In the case of a route replace failing we
saw two issues with the logging:

1) The route replace was a debug instead of a warn
  -> In this case change code to zlog_warn
2) The buf in the route replace was not being initialized
because buf initialization was protected by a debug check.
  -> In this case move the buf initialization to inside
the failure case.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
zebra/zebra_rib.c

index f4dbb3877d09589a11fa70244893d90f1a7b1174..7430532364567541f5d9d44f8453d42df8b44724 100644 (file)
@@ -1307,8 +1307,9 @@ rib_process_add_route (struct zebra_vrf *zvrf, struct route_node *rn,
       if (rib_install_kernel (rn, select, 0))
         {
           installed = 0;
-          zlog_debug ("%u:%s/%d: Route install failed",
-                       zvrf->vrf_id, buf, rn->p.prefixlen);
+          inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
+          zlog_warn ("%u:%s/%d: Route install failed",
+                     zvrf->vrf_id, buf, rn->p.prefixlen);
         }
     }
 
@@ -1393,8 +1394,9 @@ rib_process_update_route (struct zebra_vrf *zvrf, struct route_node *rn,
               if (rib_install_kernel (rn, select, 1))
                 {
                   installed = 0;
-                  zlog_debug ("%u:%s/%d: Route install failed",
-                               zvrf->vrf_id, buf, rn->p.prefixlen);
+                  inet_ntop (rn->p.family, &rn->p.u.prefix, buf, INET6_ADDRSTRLEN);
+                  zlog_warn ("%u:%s/%d: Route install failed",
+                             zvrf->vrf_id, buf, rn->p.prefixlen);
                 }
             }