]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Remove some more unprotected warnings/debugs
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 26 Sep 2016 22:39:54 +0000 (18:39 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:10 +0000 (20:26 -0500)
Pim is outputting a bunch of unprotected debugs.
In a system with a high # of events even with
no logging we will receive lots of messages.

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

index 3de438917492aec34f602e01ab47b418cf40d724..c92be18ddf276239b52c7979e8136b59320a17b1 100644 (file)
@@ -202,11 +202,14 @@ static void recv_prune(struct interface *ifp,
              struct pim_ifchannel *ch = pim_ifchannel_find (ifp, &child->sg);
              struct pim_interface *pim_ifp = ifp->info;
 
-             char buff[100];
-             strcpy (buff, pim_str_sg_dump (&up->sg));
-             zlog_debug("%s %s: Prune(S,G)=%s from %s",
-                        __FILE__, __PRETTY_FUNCTION__,
-                        buff, pim_str_sg_dump (&child->sg));
+             if (PIM_DEBUG_PIM_TRACE)
+               {
+                 char buff[100];
+                 strcpy (buff, pim_str_sg_dump (&up->sg));
+                 zlog_debug("%s %s: Prune(S,G)=%s from %s",
+                            __FILE__, __PRETTY_FUNCTION__,
+                            buff, pim_str_sg_dump (&child->sg));
+               }
 
              if (!pim_upstream_evaluate_join_desired (child))
                pim_channel_del_oif (c_oil, ifp, PIM_OIF_FLAG_PROTO_PIM);
index a35c9898ce7983a6aa7832d3eb3a3dd19d9490eb..c53a0393c0b72a2e2be2f73898568f5f596174aa 100644 (file)
@@ -719,10 +719,11 @@ int pim_mroute_del (struct channel_oil *c_oil)
 
   err = setsockopt(qpim_mroute_socket_fd, IPPROTO_IP, MRT_DEL_MFC, &c_oil->oil, sizeof(c_oil->oil));
   if (err) {
-    zlog_warn("%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,MRT_DEL_MFC): errno=%d: %s",
-             __FILE__, __PRETTY_FUNCTION__,
-             qpim_mroute_socket_fd,
-             errno, safe_strerror(errno));
+    if (PIM_DEBUG_MROUTE)
+      zlog_warn("%s %s: failure: setsockopt(fd=%d,IPPROTO_IP,MRT_DEL_MFC): errno=%d: %s",
+               __FILE__, __PRETTY_FUNCTION__,
+               qpim_mroute_socket_fd,
+               errno, safe_strerror(errno));
     return -2;
   }
 
index addccef82bee2aaaa885b5796ac6f915e1f2e3e1..1738c5f6f4531624061b0a86dc833257043c728b 100644 (file)
@@ -888,15 +888,18 @@ static int del_oif(struct channel_oil *channel_oil,
   /* Prevent single protocol from unsubscribing same interface from
      channel (S,G) multiple times */
   if (!(channel_oil->oif_flags[pim_ifp->mroute_vif_index] & proto_mask)) {
-    char group_str[100]; 
-    char source_str[100];
-    pim_inet4_dump("<group?>", channel_oil->oil.mfcc_mcastgrp, group_str, sizeof(group_str));
-    pim_inet4_dump("<source?>", channel_oil->oil.mfcc_origin, source_str, sizeof(source_str));
-    zlog_warn("%s %s: nonexistent protocol mask %u removed OIF %s (vif_index=%d, min_ttl=%d) from channel (S,G)=(%s,%s)",
-             __FILE__, __PRETTY_FUNCTION__,
-             proto_mask, oif->name, pim_ifp->mroute_vif_index,
-             channel_oil->oil.mfcc_ttls[pim_ifp->mroute_vif_index],
-             source_str, group_str);
+    if (PIM_DEBUG_MROUTE)
+      {
+       char group_str[100]; 
+       char source_str[100];
+       pim_inet4_dump("<group?>", channel_oil->oil.mfcc_mcastgrp, group_str, sizeof(group_str));
+       pim_inet4_dump("<source?>", channel_oil->oil.mfcc_origin, source_str, sizeof(source_str));
+       zlog_warn("%s %s: nonexistent protocol mask %u removed OIF %s (vif_index=%d, min_ttl=%d) from channel (S,G)=(%s,%s)",
+                 __FILE__, __PRETTY_FUNCTION__,
+                 proto_mask, oif->name, pim_ifp->mroute_vif_index,
+                 channel_oil->oil.mfcc_ttls[pim_ifp->mroute_vif_index],
+                 source_str, group_str);
+      }
     return -2;
   }