/* Schedule Hello */
if (!CHECK_FLAG(oi->flag, OSPF6_INTERFACE_PASSIVE)
&& !if_is_loopback(oi->interface)) {
- thread_add_event(master, ospf6_hello_send, oi, 0,
+ thread_add_timer(master, ospf6_hello_send, oi, 0,
&oi->thread_send_hello);
}
oi->hello_interval = strmatch(argv[0]->text, "no")
? OSPF_HELLO_INTERVAL_DEFAULT
: strtoul(argv[idx_number]->arg, NULL, 10);
+
+ /*
+ * If the thread is scheduled, send the new hello now.
+ */
+ if (thread_is_scheduled(oi->thread_send_hello)) {
+ THREAD_OFF(oi->thread_send_hello);
+
+ thread_add_timer(master, ospf6_hello_send, oi, 0,
+ &oi->thread_send_hello);
+ }
return CMD_SUCCESS;
}
/* don't send hellos over loopback interface */
if (!if_is_loopback(oi->interface))
- thread_add_event(master, ospf6_hello_send, oi, 0,
+ thread_add_timer(master, ospf6_hello_send, oi, 0,
&oi->thread_send_hello);
return CMD_SUCCESS;
uint16_t length = OSPF6_HEADER_SIZE;
oi = (struct ospf6_interface *)THREAD_ARG(thread);
- oi->thread_send_hello = (struct thread *)NULL;
if (oi->state <= OSPF6_INTERFACE_DOWN) {
if (IS_OSPF6_DEBUG_MESSAGE(OSPF6_MESSAGE_TYPE_HELLO, SEND_HDR))