c_oil = pim_find_channel_oil(sg);
if (c_oil) {
if (c_oil->oil.mfcc_parent != input_vif_index)
- if (PIM_DEBUG_MROUTE)
- zlog_debug ("%s: Existing channel oil %s points to %d, modifying to point at %d",
- __PRETTY_FUNCTION__, pim_str_sg_dump(sg), c_oil->oil.mfcc_parent, input_vif_index);
+ {
+ c_oil->oil_inherited_rescan = 1;
+ if (PIM_DEBUG_MROUTE)
+ zlog_debug ("%s: Existing channel oil %s points to %d, modifying to point at %d",
+ __PRETTY_FUNCTION__, pim_str_sg_dump(sg), c_oil->oil.mfcc_parent, input_vif_index);
+ }
c_oil->oil.mfcc_parent = input_vif_index;
++c_oil->oil_ref_count;
return c_oil;
TODO T22.
*/
if (pim_ifp->mroute_vif_index == channel_oil->oil.mfcc_parent) {
+ channel_oil->oil_inherited_rescan = 1;
if (PIM_DEBUG_MROUTE)
{
char group_str[INET_ADDRSTRLEN];
up, time);
}
-/*
- * For a given upstream, determine the inherited_olist
- * and apply it.
- *
- * inherited_olist(S,G,rpt) =
- * ( joins(*,*,RP(G)) (+) joins(*,G) (-) prunes(S,G,rpt) )
- * (+) ( pim_include(*,G) (-) pim_exclude(S,G))
- * (-) ( lost_assert(*,G) (+) lost_assert(S,G,rpt) )
- *
- * inherited_olist(S,G) =
- * inherited_olist(S,G,rpt) (+)
- * joins(S,G) (+) pim_include(S,G) (-) lost_assert(S,G)
- *
- * return 1 if there are any output interfaces
- * return 0 if there are not any output interfaces
- */
int
-pim_upstream_inherited_olist (struct pim_upstream *up)
+pim_upstream_inherited_olist_decide (struct pim_upstream *up)
{
struct pim_interface *pim_ifp;
struct listnode *chnextnode;
}
}
+ return output_intf;
+}
+
+/*
+ * For a given upstream, determine the inherited_olist
+ * and apply it.
+ *
+ * inherited_olist(S,G,rpt) =
+ * ( joins(*,*,RP(G)) (+) joins(*,G) (-) prunes(S,G,rpt) )
+ * (+) ( pim_include(*,G) (-) pim_exclude(S,G))
+ * (-) ( lost_assert(*,G) (+) lost_assert(S,G,rpt) )
+ *
+ * inherited_olist(S,G) =
+ * inherited_olist(S,G,rpt) (+)
+ * joins(S,G) (+) pim_include(S,G) (-) lost_assert(S,G)
+ *
+ * return 1 if there are any output interfaces
+ * return 0 if there are not any output interfaces
+ */
+int
+pim_upstream_inherited_olist (struct pim_upstream *up)
+{
+ int output_intf = pim_upstream_inherited_olist_decide (up);
+
/*
* If we have output_intf switch state to Join and work like normal
* If we don't have an output_intf that means we are probably a
continue;
if (rpf_result == PIM_RPF_CHANGED) {
-
+
+ /*
+ * We have detected a case where we might need to rescan
+ * the inherited o_list so do it.
+ */
+ if (up->channel_oil->oil_inherited_rescan)
+ {
+ pim_upstream_inherited_olist_decide (up);
+ up->channel_oil->oil_inherited_rescan = 0;
+ }
+
if (up->join_state == PIM_UPSTREAM_JOINED) {
/*
* If we come up real fast we can be here
* where the mroute has not been installed
* so install it.
*/
- if (up->channel_oil && !up->channel_oil->installed)
- pim_mroute_add (up->channel_oil, __PRETTY_FUNCTION__);
+ if (!up->channel_oil->installed)
+ pim_mroute_add (up->channel_oil, __PRETTY_FUNCTION__);
/*
RFC 4601: 4.5.7. Sending (S,G) Join/Prune Messages