]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: trigger on nbr up to look at rpf cache
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 29 Aug 2016 14:49:47 +0000 (10:49 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:08 +0000 (20:26 -0500)
If a neighbor comes up *after* igmp joins and *after* all
the routes are installed into the kernel, then we never
go back and fix up the rpf cache information.  So joins
never go out for those igmp joins.

Ticket: CM-12613
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_neighbor.c
pimd/pim_upstream.c
pimd/pim_upstream.h

index 4d793880923efbcf39b4b4e3f330992c79e84f7a..61e19d80056b08916e1b78965b390a209781b837 100644 (file)
@@ -462,6 +462,8 @@ struct pim_neighbor *pim_neighbor_add(struct interface *ifp,
   else
     pim_hello_restart_triggered(neigh->interface);
 
+  pim_upstream_find_new_rpf();
+
   return neigh;
 }
 
index 84b64fd7094325d584196a3d65d92b833ea47b2b..9a11eefd60bf0d5f1bbe25666a14cb8bad397459 100644 (file)
@@ -506,7 +506,7 @@ static struct pim_upstream *pim_upstream_new(struct prefix_sg *sg,
   up->rpf.source_nexthop.mrib_route_metric        = qpim_infinite_assert_metric.route_metric;
   up->rpf.rpf_addr.s_addr                         = PIM_NET_INADDR_ANY;
 
-  rpf_result = pim_rpf_update(up, 0);
+  rpf_result = pim_rpf_update(up, NULL);
   if (rpf_result == PIM_RPF_FAILURE) {
     XFREE(MTYPE_PIM_UPSTREAM, up);
     return NULL;
@@ -1102,3 +1102,31 @@ pim_upstream_inherited_olist (struct pim_upstream *up)
 
   return output_intf;
 }
+
+/*
+ * When we have a new neighbor,
+ * find upstreams that don't have their rpf_addr
+ * set and see if the new neighbor allows
+ * the join to be sent
+ */
+void
+pim_upstream_find_new_rpf (void)
+{
+  struct listnode     *up_node;
+  struct listnode     *up_nextnode;
+  struct pim_upstream *up;
+
+  /*
+    Scan all (S,G) upstreams searching for RPF'(S,G)=neigh_addr
+  */
+  for (ALL_LIST_ELEMENTS(qpim_upstream_list, up_node, up_nextnode, up))
+    {
+      if (PIM_INADDR_IS_ANY(up->rpf.rpf_addr))
+       {
+         if (PIM_DEBUG_PIM_TRACE)
+           zlog_debug ("Upstream %s without a path to send join, checking",
+                       pim_str_sg_dump (&up->sg));
+         pim_rpf_update (up, NULL);
+       }
+    }
+}
index 03dcd6bfd26bee9b632a06852eb4605f0170d6d6..95492b27c12662087169c71ea5af003d166fb6a1 100644 (file)
@@ -160,4 +160,7 @@ void pim_upstream_switch (struct pim_upstream *up, enum pim_upstream_state new_s
 const char *pim_upstream_state2str (enum pim_upstream_state join_state);
 
 int pim_upstream_inherited_olist (struct pim_upstream *up);
+
+void pim_upstream_find_new_rpf (void);
+
 #endif /* PIM_UPSTREAM_H */