mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 19:39:28 +00:00
pimd: replace direct accesses to t_ka_timer with a kat_running macro
No functional change, simple cleanup to improve readability Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
This commit is contained in:
parent
103ab2db35
commit
ec83653333
@ -445,10 +445,9 @@ static bool pim_msdp_sa_local_add_ok(struct pim_upstream *up)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!up->t_ka_timer) {
|
||||
if (!pim_upstream_is_kat_running(up))
|
||||
/* stream is not active */
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!I_am_RP(pim, up->sg.grp)) {
|
||||
/* we are not RP for the group */
|
||||
|
@ -536,7 +536,8 @@ void pim_upstream_register_reevaluate(struct pim_instance *pim)
|
||||
* is actually active; if it is not kat setup will trigger
|
||||
* source
|
||||
* registration whenever the flow becomes active. */
|
||||
if (!PIM_UPSTREAM_FLAG_TEST_FHR(up->flags) || !up->t_ka_timer)
|
||||
if (!PIM_UPSTREAM_FLAG_TEST_FHR(up->flags) ||
|
||||
!pim_upstream_is_kat_running(up))
|
||||
continue;
|
||||
|
||||
if (pim_is_grp_ssm(pim, up->sg.grp)) {
|
||||
@ -1046,11 +1047,6 @@ static bool pim_upstream_empty_immediate_olist(struct pim_instance *pim,
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool pim_upstream_is_kat_running(struct pim_upstream *up)
|
||||
{
|
||||
return (up->t_ka_timer != NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* bool JoinDesired(*,G) {
|
||||
* if (immediate_olist(*,G) != NULL)
|
||||
|
@ -242,6 +242,11 @@ struct pim_upstream {
|
||||
int64_t state_transition; /* Record current state uptime */
|
||||
};
|
||||
|
||||
static inline bool pim_upstream_is_kat_running(struct pim_upstream *up)
|
||||
{
|
||||
return (up->t_ka_timer != NULL);
|
||||
}
|
||||
|
||||
struct pim_upstream *pim_upstream_find(struct pim_instance *pim,
|
||||
struct prefix_sg *sg);
|
||||
struct pim_upstream *pim_upstream_find_or_add(struct prefix_sg *sg,
|
||||
|
Loading…
Reference in New Issue
Block a user