]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Do not spew a million warnings
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 1 Nov 2019 14:10:10 +0000 (10:10 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 1 Nov 2019 14:11:13 +0000 (10:11 -0400)
We have a zlog_warn that is unguarded ( and really is a debug message )
as that there is nothing the end user can do and nothing to note
here other than a debug message to track refcounts.  Change
to an appropriate debug and zlog_debug it instead.

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

index 66e64cefa0bfce83ecf94bb2a1a11300100cc78c..4ca38f10d1c5af53f3c9dc5c502c9ef0f3e94a10 100644 (file)
@@ -191,11 +191,13 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch)
                pim_upstream_del(pim_ifp->pim, ch->upstream,
                        __PRETTY_FUNCTION__);
 
-       else
-               zlog_warn("%s: Avoiding deletion of upstream with ref_count %d "
-                       "from ifchannel(%s): %s", __PRETTY_FUNCTION__,
-                       ch->upstream->ref_count, ch->interface->name,
-                       ch->sg_str);
+       else {
+               if (PIM_DEBUG_PIM_TRACE)
+                       zlog_debug("%s: Avoiding deletion of upstream with ref_count %d "
+                                  "from ifchannel(%s): %s", __PRETTY_FUNCTION__,
+                                  ch->upstream->ref_count, ch->interface->name,
+                                  ch->sg_str);
+       }
 
        ch->upstream = NULL;