summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetwroks.com>2016-07-23 03:33:53 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-21 20:26:03 -0500
commita3b58b4a14b838eb67c00a973d921bc060d66dca (patch)
treed280071f8361887f287216eb3359d710dc5fec9a
parent65e1fcd766040fea4453effbbf09b31059d29e98 (diff)
pimd: Fix _find and switch_to_spt_desired.
The pim_upstream_find function should not be finding a *,G Find what is asked of it. The switch_to_spt_desired should return true on the RP currently. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--pimd/pim_upstream.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c
index 60433dfe3d..a2bca9f650 100644
--- a/pimd/pim_upstream.c
+++ b/pimd/pim_upstream.c
@@ -381,12 +381,9 @@ struct pim_upstream *pim_upstream_find(struct prefix *sg)
struct pim_upstream *up;
for (ALL_LIST_ELEMENTS_RO(qpim_upstream_list, up_node, up)) {
- if (sg->u.sg.grp.s_addr == up->sg.u.sg.grp.s_addr) {
- if ((up->sg.u.sg.src.s_addr == INADDR_ANY) ||
- (sg->u.sg.src.s_addr == up->sg.u.sg.src.s_addr)) {
- return up;
- }
- }
+ if ((sg->u.sg.grp.s_addr == up->sg.u.sg.grp.s_addr) &&
+ (sg->u.sg.src.s_addr == up->sg.u.sg.src.s_addr))
+ return up;
}
return NULL;
@@ -751,6 +748,9 @@ pim_upstream_keep_alive_timer_start (struct pim_upstream *up,
int
pim_upstream_switch_to_spt_desired (struct prefix *sg)
{
+ if (I_am_RP (sg->u.sg.grp))
+ return 1;
+
return 0;
}