diff options
Diffstat (limited to 'ospf6d/ospf6_interface.c')
| -rw-r--r-- | ospf6d/ospf6_interface.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index e259befc67..c58bb3a0fb 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -827,7 +827,7 @@ void interface_up(struct thread *thread) /* 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); } @@ -2102,6 +2102,16 @@ DEFUN (ipv6_ospf6_hellointerval, 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; } @@ -2348,7 +2358,7 @@ DEFUN (no_ipv6_ospf6_passive, /* 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; |
