Skip to content

Commit

Permalink
Merge pull request #14715 from FRRouting/mergify/bp/dev/9.1/pr-14707
Browse files Browse the repository at this point in the history
pimd: Ensure upstream points at the correct rpf (backport #14707)
  • Loading branch information
donaldsharp authored Nov 2, 2023
2 parents 2ae1baf + 10f40e9 commit b44dedd
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions pimd/pim_upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,10 +662,9 @@ void pim_upstream_update_use_rpt(struct pim_upstream *up,
new_use_rpt = !!PIM_UPSTREAM_FLAG_TEST_USE_RPT(up->flags);
if (old_use_rpt != new_use_rpt) {
if (PIM_DEBUG_PIM_EVENTS)
zlog_debug("%s switched from %s to %s",
up->sg_str,
old_use_rpt?"RPT":"SPT",
new_use_rpt?"RPT":"SPT");
zlog_debug("%s switched from %s to %s", up->sg_str,
old_use_rpt ? "RPT" : "SPT",
new_use_rpt ? "RPT" : "SPT");
if (update_mroute)
pim_upstream_mroute_add(up->channel_oil, __func__);
}
Expand Down Expand Up @@ -904,9 +903,15 @@ static struct pim_upstream *pim_upstream_new(struct pim_instance *pim,
false /*update_mroute*/);
pim_upstream_mroute_iif_update(up->channel_oil, __func__);

if (PIM_UPSTREAM_FLAG_TEST_SRC_NOCACHE(up->flags))
if (PIM_UPSTREAM_FLAG_TEST_SRC_NOCACHE(up->flags)) {
/*
* Set the right RPF so that future changes will
* be right
*/
rpf_result = pim_rpf_update(pim, up, NULL, __func__);
pim_upstream_keep_alive_timer_start(
up, pim->keep_alive_time);
}
} else if (!pim_addr_is_any(up->upstream_addr)) {
pim_upstream_update_use_rpt(up,
false /*update_mroute*/);
Expand Down

0 comments on commit b44dedd

Please sign in to comment.