From f21597f04d9ac8519128b409b73be99687ed529f Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 10 Nov 2016 20:09:01 -0500 Subject: [PATCH] pimd: Fix the test to see if a upstream is (S,G,rpt) Signed-off-by: Donald Sharp --- pimd/pim_upstream.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index fe6e81ef63..8552966782 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -991,8 +991,15 @@ pim_upstream_switch_to_spt_desired (struct prefix_sg *sg) int pim_upstream_is_sg_rpt (struct pim_upstream *up) { - if (up->sptbit == PIM_UPSTREAM_SPTBIT_TRUE) - return 1; + struct listnode *chnode; + struct pim_ifchannel *ch; + + for (ALL_LIST_ELEMENTS_RO(pim_ifchannel_list, chnode, ch)) + { + if ((ch->upstream == up) && + (PIM_IF_FLAG_TEST_S_G_RPT(ch->flags))) + return 1; + } return 0; } -- 2.39.5