diff options
Diffstat (limited to 'pimd/pim_ifchannel.c')
| -rw-r--r-- | pimd/pim_ifchannel.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index cbc3c6a640..9b242e9be5 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -135,9 +135,20 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch) if (ch->upstream->flags & PIM_UPSTREAM_FLAG_MASK_SRC_IGMP) mask = PIM_OIF_FLAG_PROTO_IGMP; - /* SGRpt entry could have empty oil */ - pim_channel_del_oif(ch->upstream->channel_oil, ch->interface, - mask); + /* + * A S,G RPT channel can have an empty oil, we also + * need to take into account the fact that a ifchannel + * might have been suppressing a *,G ifchannel from + * being inherited. So let's figure out what + * needs to be done here + */ + if (pim_upstream_evaluate_join_desired_interface( + ch->upstream, ch, ch->parent)) + pim_channel_add_oif(ch->upstream->channel_oil, + ch->interface, mask); + else + pim_channel_del_oif(ch->upstream->channel_oil, + ch->interface, mask); /* * Do we have any S,G's that are inheriting? * Nuke from on high too. @@ -1393,7 +1404,9 @@ void pim_ifchannel_set_star_g_join_state(struct pim_ifchannel *ch, int eom, PIM_IF_FLAG_UNSET_S_G_RPT(child->flags); child->ifjoin_state = PIM_IFJOIN_NOINFO; - if (I_am_RP(pim, child->sg.grp)) { + if ((I_am_RP(pim, child->sg.grp)) && + (!pim_upstream_empty_inherited_olist( + child->upstream))) { pim_channel_add_oif( child->upstream->channel_oil, ch->interface, PIM_OIF_FLAG_PROTO_STAR); @@ -1414,9 +1427,9 @@ void pim_ifchannel_set_star_g_join_state(struct pim_ifchannel *ch, int eom, pim_jp_agg_single_upstream_send(&starup->rpf, starup, true); } -unsigned int pim_ifchannel_hash_key(void *arg) +unsigned int pim_ifchannel_hash_key(const void *arg) { - struct pim_ifchannel *ch = (struct pim_ifchannel *)arg; + const struct pim_ifchannel *ch = arg; return jhash_2words(ch->sg.src.s_addr, ch->sg.grp.s_addr, 0); } |
