In case interface address is learnt during configuration, make sure to
run DR election when configuring PIM/PIM passive on interface.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
ifp->name);
return NB_ERR_INCONSISTENCY;
}
+
+ /* Trigger election in case it was never run before */
+ pim_ifp = ifp->info;
+ if (pim_addr_is_any(pim_ifp->pim_dr_addr))
+ pim_if_dr_election(ifp);
} else {
pim_ifp = ifp->info;
if (!pim_ifp)
pim_ifp = ifp->info;
pim_ifp->pim_passive_enable =
yang_dnode_get_bool(args->dnode, NULL);
+
+ /* Trigger election in case it was never run before */
+ if (pim_ifp->pim_passive_enable && pim_addr_is_any(pim_ifp->pim_dr_addr))
+ pim_if_dr_election(ifp);
break;
}