]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: pim_str_sg_dump can't be called 2 times in the same debug
authorDonald Sharp <sharpd@cumulusnetwroks.com>
Thu, 28 Jul 2016 07:08:03 +0000 (03:08 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:04 +0000 (20:26 -0500)
When we call pim_str_sg_dump we cannot call the variable twice
for the same debug.  This fixes this issue in the 2 places it
was borked.

Ticket: CM-12045
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_join.c

index 09af3f1ab3869a420b9706da709280bc9c4f3bbd..265165d83b4dd74f77a6a6af1d3b41259bf04d50 100644 (file)
@@ -107,9 +107,11 @@ static void recv_join(struct interface *ifp,
 
       if (up)
         {
+         char buff[100];
+         strcpy (buff, pim_str_sg_dump (&up->sg));
          zlog_debug("%s %s: Join(S,G)=%s from %s",
                     __FILE__, __PRETTY_FUNCTION__,
-                    pim_str_sg_dump (&up->sg), pim_str_sg_dump (&sg));
+                    buff, pim_str_sg_dump (&sg));
 
          pim_rp_set_upstream_addr (&up->upstream_addr, up->sg.u.sg.src);
          pim_nexthop_lookup (&up->rpf.source_nexthop, up->upstream_addr, NULL);
@@ -168,9 +170,11 @@ static void recv_prune(struct interface *ifp,
 
       if (up)
         {
+         char buff[100];
+         strcpy (buff, pim_str_sg_dump (&up->sg));
          zlog_debug("%s %s: Prune(S,G)=%s from %s",
                     __FILE__, __PRETTY_FUNCTION__,
-                    pim_str_sg_dump (&up->sg), pim_str_sg_dump (&sg));
+                    buff, pim_str_sg_dump (&sg));
          pim_ifchannel_prune (ifp, upstream, &up->sg, source_flags, holdtime);
         }
     }