pimd: re-name SwitchToSptDesired to SwitchToSptDesiredonRp

Criteria for switching to SPT is different on RP and LHR. Re-name
the functions to make that apparent.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
This commit is contained in:
Anuradha Karuppiah 2019-11-15 11:29:57 -08:00
parent ec83653333
commit 2ef4ed70c9
3 changed files with 5 additions and 5 deletions

View File

@ -452,7 +452,7 @@ int pim_register_recv(struct interface *ifp, struct in_addr dest_addr,
}
if ((upstream->sptbit == PIM_UPSTREAM_SPTBIT_TRUE)
|| ((SwitchToSptDesired(pim_ifp->pim, &sg))
|| ((SwitchToSptDesiredOnRp(pim_ifp->pim, &sg))
&& pim_upstream_inherited_olist(pim_ifp->pim, upstream)
== 0)) {
pim_register_stop_send(ifp, &sg, dest_addr, src_addr);
@ -463,7 +463,7 @@ int pim_register_recv(struct interface *ifp, struct in_addr dest_addr,
upstream->sptbit);
}
if ((upstream->sptbit == PIM_UPSTREAM_SPTBIT_TRUE)
|| (SwitchToSptDesired(pim_ifp->pim, &sg))) {
|| (SwitchToSptDesiredOnRp(pim_ifp->pim, &sg))) {
if (sentRegisterStop) {
pim_upstream_keep_alive_timer_start(
upstream,

View File

@ -1425,7 +1425,7 @@ void pim_upstream_msdp_reg_timer_start(struct pim_upstream *up)
* SwitchToSptDesired(S,G) return true once a single packet has been
* received for the source and group.
*/
int pim_upstream_switch_to_spt_desired(struct pim_instance *pim,
int pim_upstream_switch_to_spt_desired_on_rp(struct pim_instance *pim,
struct prefix_sg *sg)
{
if (I_am_RP(pim, sg->grp))

View File

@ -292,9 +292,9 @@ void pim_upstream_update_my_assert_metric(struct pim_upstream *up);
void pim_upstream_keep_alive_timer_start(struct pim_upstream *up,
uint32_t time);
int pim_upstream_switch_to_spt_desired(struct pim_instance *pim,
int pim_upstream_switch_to_spt_desired_on_rp(struct pim_instance *pim,
struct prefix_sg *sg);
#define SwitchToSptDesired(pim, sg) pim_upstream_switch_to_spt_desired (pim, sg)
#define SwitchToSptDesiredOnRp(pim, sg) pim_upstream_switch_to_spt_desired_on_rp (pim, sg)
int pim_upstream_is_sg_rpt(struct pim_upstream *up);
void pim_upstream_set_sptbit(struct pim_upstream *up,