pimd: Modify downstream JP state to take into account all states

When we make a decision about downstream state let's
take into account all states.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2016-11-09 08:30:04 -05:00
parent 7f8b8a9af6
commit b76d6e718e

View File

@ -42,7 +42,20 @@
*/ */
static int downstream_jpstate_isjoined(const struct pim_ifchannel *ch) static int downstream_jpstate_isjoined(const struct pim_ifchannel *ch)
{ {
return (ch->ifjoin_state != PIM_IFJOIN_NOINFO); switch (ch->ifjoin_state)
{
case PIM_IFJOIN_NOINFO:
case PIM_IFJOIN_PRUNE:
case PIM_IFJOIN_PRUNE_TMP:
case PIM_IFJOIN_PRUNE_PENDING_TMP:
return 0;
break;
case PIM_IFJOIN_JOIN:
case PIM_IFJOIN_PRUNE_PENDING:
return 1;
break;
}
return 0;
} }
/* /*