]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Fix *,g pruning
authorDonald Sharp <sharpd@cumulusnetwroks.com>
Thu, 28 Jul 2016 06:46:36 +0000 (02:46 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:04 +0000 (20:26 -0500)
We were not properly handling the receipt of prune *,g messages.

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

index 732dd823ad5219145ee9fa30c6774567d56263f2..09af3f1ab3869a420b9706da709280bc9c4f3bbd 100644 (file)
@@ -99,7 +99,7 @@ static void recv_join(struct interface *ifp,
   pim_ifchannel_join_add(ifp, neigh->source_addr, upstream,
                         &sg, source_flags, holdtime);
 
-  if (I_am_RP (group) && source.s_addr == INADDR_ANY)
+  if (I_am_RP (group) && sg.u.sg.src.s_addr == INADDR_ANY)
     {
       struct pim_upstream *up;
 
@@ -145,10 +145,22 @@ static void recv_prune(struct interface *ifp,
              source_flags & PIM_WILDCARD_BIT_MASK,
              up_str, holdtime, neigh_str, ifp->name);
   }
+
+  if ((source_flags & PIM_RPT_BIT_MASK) &&
+      (source_flags & PIM_WILDCARD_BIT_MASK))
+    {
+      struct pim_rpf *rp = RP (sg.u.sg.grp);
+
+      // Ignoring Prune *,G's at the moment.
+      if (sg.u.sg.src.s_addr != rp->rpf_addr.s_addr)
+       return;
+
+      sg.u.sg.src.s_addr = INADDR_ANY;
+    }
   
   pim_ifchannel_prune(ifp, upstream, &sg, source_flags, holdtime);
 
-  if (I_am_RP (group) && source.s_addr == INADDR_ANY)
+  if (I_am_RP (group) && sg.u.sg.src.s_addr == INADDR_ANY)
     {
       struct pim_upstream *up;