#include "pim_upstream.h"
#include "pim_ifchannel.h"
#include "pim_rp.h"
+#include "pim_zebra.h"
static void dr_election_by_addr(struct interface *ifp)
{
return listnode_head (pim_ifp->pim_neighbor_list);
}
+/* rpf info associated with an upstream entry needs to be re-evaluated
+ * when an RPF neighbor comes or goes */
+static void
+pim_neighbor_rpf_update(void)
+{
+ /* XXX: for the time being piggyback on the timer used on rib changes
+ * to scan and update the rpf nexthop. This is expensive processing
+ * and we should be able to optimize neighbor changes differently than
+ * nexthop changes. */
+ sched_rpf_cache_refresh();
+}
+
struct pim_neighbor *pim_neighbor_add(struct interface *ifp,
struct in_addr source_addr,
pim_hello_options hello_options,
pim_upstream_find_new_rpf();
pim_rp_setup ();
+
+ pim_neighbor_rpf_update();
return neigh;
}
listnode_delete(pim_ifp->pim_neighbor_list, neigh);
pim_neighbor_free(neigh);
+
+ pim_neighbor_rpf_update();
}
void pim_neighbor_delete_all(struct interface *ifp,