]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Fix debugs to be more logical
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 26 Aug 2016 18:09:41 +0000 (14:09 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:08 +0000 (20:26 -0500)
The rpf debugs really should be zebra debugs
instead of trace debugs.

Additionally fix a return 0; to return NULL;

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_iface.c
pimd/pim_rpf.c

index 867f59679add2086a88827cd6da514ccb9ede97b..503be0d0bca9908f83821ab1c46c8ac29f676577 100644 (file)
@@ -908,7 +908,7 @@ struct pim_neighbor *pim_if_find_neighbor(struct interface *ifp,
               addr_str, ifp->name);
   }
 
-  return 0;
+  return NULL;
 }
 
 long pim_if_t_suppressed_msec(struct interface *ifp)
index e81e262cd6c8367a3c951403b59b04435fd8abfa..da5f16240a966b21ef2cac95eb064e6f2f353538 100644 (file)
@@ -88,7 +88,7 @@ int pim_nexthop_lookup(struct pim_nexthop *nexthop, struct in_addr addr)
     /* debug warning only, do not return */
   }
 
-  if (PIM_DEBUG_PIM_TRACE) {
+  if (PIM_DEBUG_ZEBRA) {
     char nexthop_str[100];
     char addr_str[100];
     pim_inet4_dump("<nexthop?>", nexthop_tab[0].nexthop_addr, nexthop_str, sizeof(nexthop_str));
@@ -136,7 +136,7 @@ enum pim_rpf_result pim_rpf_update(struct pim_upstream *up, struct in_addr *old_
   }
 
   rpf->rpf_addr = pim_rpf_find_rpf_addr(up);
-  if (PIM_INADDR_IS_ANY(rpf->rpf_addr) && PIM_DEBUG_PIM_EVENTS) {
+  if (PIM_INADDR_IS_ANY(rpf->rpf_addr) && PIM_DEBUG_ZEBRA) {
     /* RPF'(S,G) not found */
     zlog_debug("%s %s: RPF'%s not found: won't send join upstream",
               __FILE__, __PRETTY_FUNCTION__,
@@ -147,7 +147,7 @@ enum pim_rpf_result pim_rpf_update(struct pim_upstream *up, struct in_addr *old_
   /* detect change in pim_nexthop */
   if (nexthop_mismatch(&rpf->source_nexthop, &save_nexthop)) {
 
-    if (PIM_DEBUG_PIM_EVENTS) {
+    if (PIM_DEBUG_ZEBRA) {
       char nhaddr_str[100];
       pim_inet4_dump("<addr?>", rpf->source_nexthop.mrib_nexthop_addr, nhaddr_str, sizeof(nhaddr_str));
       zlog_debug("%s %s: (S,G)=%s source nexthop now is: interface=%s address=%s pref=%d metric=%d",
@@ -167,7 +167,7 @@ enum pim_rpf_result pim_rpf_update(struct pim_upstream *up, struct in_addr *old_
   /* detect change in RPF_interface(S) */
   if (save_nexthop.interface != rpf->source_nexthop.interface) {
 
-    if (PIM_DEBUG_PIM_EVENTS) {
+    if (PIM_DEBUG_ZEBRA) {
       zlog_debug("%s %s: (S,G)=%s RPF_interface(S) changed from %s to %s",
                 __FILE__, __PRETTY_FUNCTION__,
                 pim_str_sg_dump (&up->sg),