hello_option_override_interval,
hello_option_dr_priority,
hello_option_generation_id,
- hello_option_addr_list);
+ hello_option_addr_list,
+ PIM_NEIGHBOR_SEND_DELAY);
if (!neigh) {
if (PIM_DEBUG_PIM_HELLO) {
char src_str[100];
/* GenID mismatch ? */
if (!PIM_OPTION_IS_SET(neigh->hello_options, PIM_OPTION_MASK_GENERATION_ID) ||
(hello_option_generation_id != neigh->generation_id)) {
-
- /* GenID changed */
-
- pim_upstream_rpf_genid_changed(neigh->source_addr);
-
/* GenID mismatch, then replace neighbor */
if (PIM_DEBUG_PIM_HELLO) {
hello_option_override_interval,
hello_option_dr_priority,
hello_option_generation_id,
- hello_option_addr_list);
+ hello_option_addr_list,
+ PIM_NEIGHBOR_SEND_NOW);
if (!neigh) {
if (PIM_DEBUG_PIM_HELLO) {
char src_str[100];
uint16_t override_interval,
uint32_t dr_priority,
uint32_t generation_id,
- struct list *addr_list)
+ struct list *addr_list,
+ int send_hello_now)
{
struct pim_interface *pim_ifp;
struct pim_neighbor *neigh;
message with a new GenID is received from an existing neighbor, a
new Hello message should be sent on this interface after a
randomized delay between 0 and Triggered_Hello_Delay.
+
+ This is a bit silly to do it that way. If I get a new
+ genid we need to send the hello *now* because we've
+ lined up a bunch of join/prune messages to go out the
+ interface.
*/
- pim_hello_restart_triggered(neigh->interface);
+ if (send_hello_now)
+ pim_hello_restart_now (ifp);
+ else
+ pim_hello_restart_triggered(neigh->interface);
return neigh;
}
void pim_neighbor_free(struct pim_neighbor *neigh);
struct pim_neighbor *pim_neighbor_find(struct interface *ifp,
struct in_addr source_addr);
+
+
+#define PIM_NEIGHBOR_SEND_DELAY 0
+#define PIM_NEIGHBOR_SEND_NOW 1
struct pim_neighbor *pim_neighbor_add(struct interface *ifp,
struct in_addr source_addr,
pim_hello_options hello_options,
uint16_t override_interval,
uint32_t dr_priority,
uint32_t generation_id,
- struct list *addr_list);
+ struct list *addr_list,
+ int send_hello_now);
void pim_neighbor_delete(struct interface *ifp,
struct pim_neighbor *neigh,
const char *delete_message);