Skip to content

Commit

Permalink
pimd: re-name SwitchToSptDesired to SwitchToSptDesiredonRp
Browse files Browse the repository at this point in the history
Criteria for switching to SPT is different on RP and LHR. Re-name
the functions to make that apparent.

Signed-off-by: Anuradha Karuppiah <[email protected]>
  • Loading branch information
AnuradhaKaruppiah committed Nov 15, 2019
1 parent ec83653 commit 2ef4ed7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pimd/pim_register.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pimd/pim_upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions pimd/pim_upstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2ef4ed7

Please sign in to comment.