{
struct listnode *chnode;
struct listnode *chnextnode;
- struct pim_interface *pim_ifp;
- struct pim_ifchannel *ch;
+ struct pim_ifchannel *ch = NULL;
/* scan (S,G) state */
- for (ALL_LIST_ELEMENTS(pim_ifchannel_list, chnode, chnextnode, ch)) {
- pim_ifp = ch->interface->info;
- if (!pim_ifp)
- continue;
-
- if (ch->upstream != up)
- continue;
-
+ for (ALL_LIST_ELEMENTS(up->ifchannels, chnode, chnextnode, ch)) {
if (pim_macro_chisin_oiflist(ch))
pim_forward_start(ch);
{
struct listnode *chnode;
struct listnode *chnextnode;
- struct pim_interface *pim_ifp;
struct pim_ifchannel *ch;
/* scan per-interface (S,G) state */
- for (ALL_LIST_ELEMENTS(pim_ifchannel_list, chnode, chnextnode, ch)) {
- pim_ifp = ch->interface->info;
- if (!pim_ifp)
- continue;
-
- if (ch->upstream != up)
- continue;
+ for (ALL_LIST_ELEMENTS(up->ifchannels, chnode, chnextnode, ch)) {
pim_forward_stop(ch);
struct listnode *chnode;
struct listnode *chnextnode;
struct pim_ifchannel *ch;
- struct pim_interface *pim_ifp;
/* search all ifchannels */
- for (ALL_LIST_ELEMENTS(pim_ifchannel_list, chnode, chnextnode, ch)) {
-
- pim_ifp = ch->interface->info;
- if (!pim_ifp)
- continue;
-
- if (ch->upstream != up)
- continue;
-
+ for (ALL_LIST_ELEMENTS(up->ifchannels, chnode, chnextnode, ch)) {
if (ch->ifassert_state == PIM_IFASSERT_I_AM_LOSER) {
if (
/* RPF_interface(S) was NOT I */
{
struct listnode *chnode;
struct listnode *chnextnode;
- struct pim_interface *pim_ifp;
struct pim_ifchannel *ch;
/* scan per-interface (S,G) state */
- for (ALL_LIST_ELEMENTS(pim_ifchannel_list, chnode, chnextnode, ch)) {
- pim_ifp = ch->interface->info;
- if (!pim_ifp)
- continue;
-
- if (ch->upstream != up)
- continue;
-
+ for (ALL_LIST_ELEMENTS(up->ifchannels, chnode, chnextnode, ch)) {
pim_ifchannel_update_could_assert(ch);
} /* scan iface channel list */
}
{
struct listnode *chnode;
struct listnode *chnextnode;
- struct pim_interface *pim_ifp;
struct pim_ifchannel *ch;
/* scan per-interface (S,G) state */
- for (ALL_LIST_ELEMENTS(pim_ifchannel_list, chnode, chnextnode, ch)) {
- pim_ifp = ch->interface->info;
- if (!pim_ifp)
- continue;
-
- if (ch->upstream != up)
- continue;
-
+ for (ALL_LIST_ELEMENTS(up->ifchannels, chnode, chnextnode, ch)) {
pim_ifchannel_update_my_assert_metric(ch);
} /* scan iface channel list */
struct pim_ifchannel *ch;
/* scan per-interface (S,G) state */
- for (ALL_LIST_ELEMENTS(pim_ifchannel_list, chnode, chnextnode, ch)) {
+ for (ALL_LIST_ELEMENTS(up->ifchannels, chnode, chnextnode, ch)) {
pim_ifp = ch->interface->info;
if (!pim_ifp)
continue;
- if (ch->upstream != up)
- continue;
-
pim_ifchannel_update_assert_tracking_desired(ch);
} /* scan iface channel list */
struct listnode *chnode;
struct pim_ifchannel *ch;
- for (ALL_LIST_ELEMENTS_RO(pim_ifchannel_list, chnode, ch))
+ for (ALL_LIST_ELEMENTS_RO(up->ifchannels, chnode, ch))
{
- if ((ch->upstream == up) &&
- (PIM_IF_FLAG_TEST_S_G_RPT(ch->flags)))
- return 1;
+ if (PIM_IF_FLAG_TEST_S_G_RPT(ch->flags))
+ return 1;
}
return 0;