#include "thread.h"
#include "memory.h"
#include "if.h"
+#include "network.h"
#include "pimd.h"
#include "pim_pim.h"
#include "pim_bsm.h"
static int on_pim_hello_send(struct thread *t);
-static int pim_hello_send(struct interface *ifp, uint16_t holdtime);
static const char *pim_pim_msgtype2str(enum pim_msg_type type)
{
pim_ifp->pim_dr_num_nondrpri_neighbors =
0; /* neighbors without dr_pri */
pim_ifp->pim_dr_addr = pim_ifp->primary_address;
+ pim_ifp->am_i_dr = true;
pim_ifstat_reset(ifp);
}
return 0;
}
-static int pim_hello_send(struct interface *ifp, uint16_t holdtime)
+int pim_hello_send(struct interface *ifp, uint16_t holdtime)
{
struct pim_interface *pim_ifp = ifp->info;
old_genid = pim_ifp->pim_generation_id;
while (old_genid == pim_ifp->pim_generation_id)
- pim_ifp->pim_generation_id = random();
+ pim_ifp->pim_generation_id = frr_weak_random();
zlog_info("PIM INTERFACE UP: on interface %s ifindex=%d", ifp->name,
ifp->ifindex);