From: Donald Sharp Date: Fri, 11 Nov 2016 01:09:01 +0000 (-0500) Subject: pimd: Fix the test to see if a upstream is (S,G,rpt) X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~106 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f21597f04d9ac8519128b409b73be99687ed529f;p=mirror%2Ffrr.git pimd: Fix the test to see if a upstream is (S,G,rpt) Signed-off-by: Donald Sharp --- 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; }