mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 04:26:12 +00:00
pimd: fixup JD macro to use "peer-msdp-sa" check instead of I_am_RP check
JD macro is defined by the RFC as - bool JoinDesired(S,G) { return (immediate_olist(S,G) != NULL OR (KeepaliveTimer(S,G) is running AND inherited_olist(S,G) != NULL)) } However for MSDP synced SA the KAT will not be running so an exception is needed. Earlier I had done this by relaxing KAT_run requirements entirely on the RP. However as that prevents the source from being aged out in some cases I have made the check more narrow i.e. has to an MSDP peer added entry. Ticket: CM-24398 Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
This commit is contained in:
parent
c5cdf06960
commit
41a115e4f0
@ -126,7 +126,12 @@ static void pim_msdp_sa_upstream_del(struct pim_msdp_sa *sa)
|
||||
if (PIM_UPSTREAM_FLAG_TEST_SRC_MSDP(up->flags)) {
|
||||
PIM_UPSTREAM_FLAG_UNSET_SRC_MSDP(up->flags);
|
||||
sa->flags |= PIM_MSDP_SAF_UP_DEL_IN_PROG;
|
||||
pim_upstream_del(sa->pim, up, __PRETTY_FUNCTION__);
|
||||
up = pim_upstream_del(sa->pim, up, __PRETTY_FUNCTION__);
|
||||
/* re-eval joinDesired; clearing peer-msdp-sa flag can
|
||||
* cause JD to change
|
||||
*/
|
||||
if (up)
|
||||
pim_upstream_update_join_desired(sa->pim, up);
|
||||
sa->flags &= ~PIM_MSDP_SAF_UP_DEL_IN_PROG;
|
||||
}
|
||||
|
||||
|
@ -933,6 +933,15 @@ void pim_upstream_ref(struct pim_upstream *up, int flags, const char *name)
|
||||
pim_upstream_update_use_rpt(up, true /*update_mroute*/);
|
||||
}
|
||||
|
||||
/* re-eval joinDesired; clearing peer-msdp-sa flag can
|
||||
* cause JD to change
|
||||
*/
|
||||
if (!PIM_UPSTREAM_FLAG_TEST_SRC_MSDP(up->flags) &&
|
||||
PIM_UPSTREAM_FLAG_TEST_SRC_MSDP(flags)) {
|
||||
PIM_UPSTREAM_FLAG_SET_SRC_MSDP(up->flags);
|
||||
pim_upstream_update_join_desired(up->pim, up);
|
||||
}
|
||||
|
||||
up->flags |= flags;
|
||||
++up->ref_count;
|
||||
if (PIM_DEBUG_PIM_TRACE)
|
||||
@ -1073,6 +1082,12 @@ static bool pim_upstream_empty_immediate_olist(struct pim_instance *pim,
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static inline bool pim_upstream_is_msdp_peer_sa(struct pim_upstream *up)
|
||||
{
|
||||
return PIM_UPSTREAM_FLAG_TEST_SRC_MSDP(up->flags);
|
||||
}
|
||||
|
||||
/*
|
||||
* bool JoinDesired(*,G) {
|
||||
* if (immediate_olist(*,G) != NULL)
|
||||
@ -1105,7 +1120,7 @@ int pim_upstream_evaluate_join_desired(struct pim_instance *pim,
|
||||
empty_inh_oil = pim_upstream_empty_inherited_olist(up);
|
||||
if (!empty_inh_oil &&
|
||||
(pim_upstream_is_kat_running(up) ||
|
||||
I_am_RP(pim, up->sg.grp)))
|
||||
pim_upstream_is_msdp_peer_sa(up)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user