]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6_neighbor.c
Merge pull request #13060 from opensourcerouting/feature/allow_peering_with_127.0.0.1
[mirror_frr.git] / ospf6d / ospf6_neighbor.c
index a4ba1fb5696bf72fc927e9b1da97bbabfb986b2c..42e4074522b12ab557c838597f6c9680966d2ea7 100644 (file)
@@ -1,28 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Copyright (C) 2003 Yasuhiro Ohara
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * GNU Zebra is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <zebra.h>
 
 #include "log.h"
 #include "memory.h"
-#include "thread.h"
+#include "frrevent.h"
 #include "linklist.h"
 #include "vty.h"
 #include "command.h"
@@ -178,18 +163,18 @@ void ospf6_neighbor_delete(struct ospf6_neighbor *on)
        ospf6_lsdb_delete(on->lsupdate_list);
        ospf6_lsdb_delete(on->lsack_list);
 
-       THREAD_OFF(on->inactivity_timer);
+       EVENT_OFF(on->inactivity_timer);
 
-       THREAD_OFF(on->last_dbdesc_release_timer);
+       EVENT_OFF(on->last_dbdesc_release_timer);
 
-       THREAD_OFF(on->thread_send_dbdesc);
-       THREAD_OFF(on->thread_send_lsreq);
-       THREAD_OFF(on->thread_send_lsupdate);
-       THREAD_OFF(on->thread_send_lsack);
-       THREAD_OFF(on->thread_exchange_done);
-       THREAD_OFF(on->thread_adj_ok);
+       EVENT_OFF(on->thread_send_dbdesc);
+       EVENT_OFF(on->thread_send_lsreq);
+       EVENT_OFF(on->thread_send_lsupdate);
+       EVENT_OFF(on->thread_send_lsack);
+       EVENT_OFF(on->thread_exchange_done);
+       EVENT_OFF(on->thread_adj_ok);
 
-       THREAD_OFF(on->gr_helper_info.t_grace_timer);
+       EVENT_OFF(on->gr_helper_info.t_grace_timer);
 
        bfd_sess_free(&on->bfd_session);
        XFREE(MTYPE_OSPF6_NEIGHBOR, on);
@@ -211,10 +196,12 @@ static void ospf6_neighbor_state_change(uint8_t next_state,
 
        /* log */
        if (IS_OSPF6_DEBUG_NEIGHBOR(STATE)) {
-               zlog_debug("Neighbor state change %s: [%s]->[%s] (%s)",
-                          on->name, ospf6_neighbor_state_str[prev_state],
-                          ospf6_neighbor_state_str[next_state],
-                          ospf6_neighbor_event_string(event));
+               zlog_debug(
+                       "Neighbor state change %s (Router-ID: %pI4): [%s]->[%s] (%s)",
+                       on->name, &on->router_id,
+                       ospf6_neighbor_state_str[prev_state],
+                       ospf6_neighbor_state_str[next_state],
+                       ospf6_neighbor_event_string(event));
        }
 
        /* Optionally notify about adjacency changes */
@@ -224,10 +211,13 @@ static void ospf6_neighbor_state_change(uint8_t next_state,
                           OSPF6_LOG_ADJACENCY_DETAIL)
                || (next_state == OSPF6_NEIGHBOR_FULL)
                || (next_state < prev_state)))
-               zlog_notice("AdjChg: Nbr %s: %s -> %s (%s)", on->name,
-                           ospf6_neighbor_state_str[prev_state],
-                           ospf6_neighbor_state_str[next_state],
-                           ospf6_neighbor_event_string(event));
+               zlog_notice(
+                       "AdjChg: Nbr %pI4(%s) on %s: %s -> %s (%s)",
+                       &on->router_id,
+                       vrf_id_to_name(on->ospf6_if->interface->vrf->vrf_id),
+                       on->name, ospf6_neighbor_state_str[prev_state],
+                       ospf6_neighbor_state_str[next_state],
+                       ospf6_neighbor_event_string(event));
 
        if (prev_state == OSPF6_NEIGHBOR_FULL
            || next_state == OSPF6_NEIGHBOR_FULL) {
@@ -282,31 +272,31 @@ static int need_adjacency(struct ospf6_neighbor *on)
        return 0;
 }
 
-void hello_received(struct thread *thread)
+void hello_received(struct event *thread)
 {
        struct ospf6_neighbor *on;
 
-       on = (struct ospf6_neighbor *)THREAD_ARG(thread);
+       on = (struct ospf6_neighbor *)EVENT_ARG(thread);
        assert(on);
 
        if (IS_OSPF6_DEBUG_NEIGHBOR(EVENT))
                zlog_debug("Neighbor Event %s: *HelloReceived*", on->name);
 
        /* reset Inactivity Timer */
-       THREAD_OFF(on->inactivity_timer);
-       thread_add_timer(master, inactivity_timer, on,
-                        on->ospf6_if->dead_interval, &on->inactivity_timer);
+       EVENT_OFF(on->inactivity_timer);
+       event_add_timer(master, inactivity_timer, on,
+                       on->ospf6_if->dead_interval, &on->inactivity_timer);
 
        if (on->state <= OSPF6_NEIGHBOR_DOWN)
                ospf6_neighbor_state_change(OSPF6_NEIGHBOR_INIT, on,
                                            OSPF6_NEIGHBOR_EVENT_HELLO_RCVD);
 }
 
-void twoway_received(struct thread *thread)
+void twoway_received(struct event *thread)
 {
        struct ospf6_neighbor *on;
 
-       on = (struct ospf6_neighbor *)THREAD_ARG(thread);
+       on = (struct ospf6_neighbor *)EVENT_ARG(thread);
        assert(on);
 
        if (on->state > OSPF6_NEIGHBOR_INIT)
@@ -315,7 +305,7 @@ void twoway_received(struct thread *thread)
        if (IS_OSPF6_DEBUG_NEIGHBOR(EVENT))
                zlog_debug("Neighbor Event %s: *2Way-Received*", on->name);
 
-       thread_add_event(master, neighbor_change, on->ospf6_if, 0, NULL);
+       event_add_event(master, neighbor_change, on->ospf6_if, 0, NULL);
 
        if (!need_adjacency(on)) {
                ospf6_neighbor_state_change(OSPF6_NEIGHBOR_TWOWAY, on,
@@ -329,17 +319,17 @@ void twoway_received(struct thread *thread)
        SET_FLAG(on->dbdesc_bits, OSPF6_DBDESC_MBIT);
        SET_FLAG(on->dbdesc_bits, OSPF6_DBDESC_IBIT);
 
-       THREAD_OFF(on->thread_send_dbdesc);
-       thread_add_event(master, ospf6_dbdesc_send, on, 0,
-                        &on->thread_send_dbdesc);
+       EVENT_OFF(on->thread_send_dbdesc);
+       event_add_event(master, ospf6_dbdesc_send, on, 0,
+                       &on->thread_send_dbdesc);
 }
 
-void negotiation_done(struct thread *thread)
+void negotiation_done(struct event *thread)
 {
        struct ospf6_neighbor *on;
        struct ospf6_lsa *lsa, *lsanext;
 
-       on = (struct ospf6_neighbor *)THREAD_ARG(thread);
+       on = (struct ospf6_neighbor *)EVENT_ARG(thread);
        assert(on);
 
        if (on->state != OSPF6_NEIGHBOR_EXSTART)
@@ -383,19 +373,19 @@ void negotiation_done(struct thread *thread)
                                    OSPF6_NEIGHBOR_EVENT_NEGOTIATION_DONE);
 }
 
-static void ospf6_neighbor_last_dbdesc_release(struct thread *thread)
+static void ospf6_neighbor_last_dbdesc_release(struct event *thread)
 {
-       struct ospf6_neighbor *on = THREAD_ARG(thread);
+       struct ospf6_neighbor *on = EVENT_ARG(thread);
 
        assert(on);
        memset(&on->dbdesc_last, 0, sizeof(struct ospf6_dbdesc));
 }
 
-void exchange_done(struct thread *thread)
+void exchange_done(struct event *thread)
 {
        struct ospf6_neighbor *on;
 
-       on = (struct ospf6_neighbor *)THREAD_ARG(thread);
+       on = (struct ospf6_neighbor *)EVENT_ARG(thread);
        assert(on);
 
        if (on->state != OSPF6_NEIGHBOR_EXCHANGE)
@@ -404,15 +394,15 @@ void exchange_done(struct thread *thread)
        if (IS_OSPF6_DEBUG_NEIGHBOR(EVENT))
                zlog_debug("Neighbor Event %s: *ExchangeDone*", on->name);
 
-       THREAD_OFF(on->thread_send_dbdesc);
+       EVENT_OFF(on->thread_send_dbdesc);
        ospf6_lsdb_remove_all(on->dbdesc_list);
 
        /* RFC 2328 (10.8): Release the last dbdesc after dead_interval */
        if (!CHECK_FLAG(on->dbdesc_bits, OSPF6_DBDESC_MSBIT)) {
-               THREAD_OFF(on->last_dbdesc_release_timer);
-               thread_add_timer(master, ospf6_neighbor_last_dbdesc_release, on,
-                                on->ospf6_if->dead_interval,
-                                &on->last_dbdesc_release_timer);
+               EVENT_OFF(on->last_dbdesc_release_timer);
+               event_add_timer(master, ospf6_neighbor_last_dbdesc_release, on,
+                               on->ospf6_if->dead_interval,
+                               &on->last_dbdesc_release_timer);
        }
 
        if (on->request_list->count == 0)
@@ -422,8 +412,8 @@ void exchange_done(struct thread *thread)
                ospf6_neighbor_state_change(OSPF6_NEIGHBOR_LOADING, on,
                                            OSPF6_NEIGHBOR_EVENT_EXCHANGE_DONE);
 
-               thread_add_event(master, ospf6_lsreq_send, on, 0,
-                                &on->thread_send_lsreq);
+               event_add_event(master, ospf6_lsreq_send, on, 0,
+                               &on->thread_send_lsreq);
        }
 }
 
@@ -438,20 +428,20 @@ void ospf6_check_nbr_loading(struct ospf6_neighbor *on)
        if ((on->state == OSPF6_NEIGHBOR_LOADING)
            || (on->state == OSPF6_NEIGHBOR_EXCHANGE)) {
                if (on->request_list->count == 0)
-                       thread_add_event(master, loading_done, on, 0, NULL);
+                       event_add_event(master, loading_done, on, 0, NULL);
                else if (on->last_ls_req == NULL) {
-                       THREAD_OFF(on->thread_send_lsreq);
-                       thread_add_event(master, ospf6_lsreq_send, on, 0,
-                                        &on->thread_send_lsreq);
+                       EVENT_OFF(on->thread_send_lsreq);
+                       event_add_event(master, ospf6_lsreq_send, on, 0,
+                                       &on->thread_send_lsreq);
                }
        }
 }
 
-void loading_done(struct thread *thread)
+void loading_done(struct event *thread)
 {
        struct ospf6_neighbor *on;
 
-       on = (struct ospf6_neighbor *)THREAD_ARG(thread);
+       on = (struct ospf6_neighbor *)EVENT_ARG(thread);
        assert(on);
 
        if (on->state != OSPF6_NEIGHBOR_LOADING)
@@ -466,11 +456,11 @@ void loading_done(struct thread *thread)
                                    OSPF6_NEIGHBOR_EVENT_LOADING_DONE);
 }
 
-void adj_ok(struct thread *thread)
+void adj_ok(struct event *thread)
 {
        struct ospf6_neighbor *on;
 
-       on = (struct ospf6_neighbor *)THREAD_ARG(thread);
+       on = (struct ospf6_neighbor *)EVENT_ARG(thread);
        assert(on);
 
        if (IS_OSPF6_DEBUG_NEIGHBOR(EVENT))
@@ -483,9 +473,9 @@ void adj_ok(struct thread *thread)
                SET_FLAG(on->dbdesc_bits, OSPF6_DBDESC_MBIT);
                SET_FLAG(on->dbdesc_bits, OSPF6_DBDESC_IBIT);
 
-               THREAD_OFF(on->thread_send_dbdesc);
-               thread_add_event(master, ospf6_dbdesc_send, on, 0,
-                                &on->thread_send_dbdesc);
+               EVENT_OFF(on->thread_send_dbdesc);
+               event_add_event(master, ospf6_dbdesc_send, on, 0,
+                               &on->thread_send_dbdesc);
 
        } else if (on->state >= OSPF6_NEIGHBOR_EXSTART && !need_adjacency(on)) {
                ospf6_neighbor_state_change(OSPF6_NEIGHBOR_TWOWAY, on,
@@ -494,11 +484,11 @@ void adj_ok(struct thread *thread)
        }
 }
 
-void seqnumber_mismatch(struct thread *thread)
+void seqnumber_mismatch(struct event *thread)
 {
        struct ospf6_neighbor *on;
 
-       on = (struct ospf6_neighbor *)THREAD_ARG(thread);
+       on = (struct ospf6_neighbor *)EVENT_ARG(thread);
        assert(on);
 
        if (on->state < OSPF6_NEIGHBOR_EXCHANGE)
@@ -515,18 +505,18 @@ void seqnumber_mismatch(struct thread *thread)
 
        ospf6_neighbor_clear_ls_lists(on);
 
-       THREAD_OFF(on->thread_send_dbdesc);
+       EVENT_OFF(on->thread_send_dbdesc);
        on->dbdesc_seqnum++; /* Incr seqnum as per RFC2328, sec 10.3 */
 
-       thread_add_event(master, ospf6_dbdesc_send, on, 0,
-                        &on->thread_send_dbdesc);
+       event_add_event(master, ospf6_dbdesc_send, on, 0,
+                       &on->thread_send_dbdesc);
 }
 
-void bad_lsreq(struct thread *thread)
+void bad_lsreq(struct event *thread)
 {
        struct ospf6_neighbor *on;
 
-       on = (struct ospf6_neighbor *)THREAD_ARG(thread);
+       on = (struct ospf6_neighbor *)EVENT_ARG(thread);
        assert(on);
 
        if (on->state < OSPF6_NEIGHBOR_EXCHANGE)
@@ -543,19 +533,18 @@ void bad_lsreq(struct thread *thread)
 
        ospf6_neighbor_clear_ls_lists(on);
 
-       THREAD_OFF(on->thread_send_dbdesc);
+       EVENT_OFF(on->thread_send_dbdesc);
        on->dbdesc_seqnum++; /* Incr seqnum as per RFC2328, sec 10.3 */
 
-       thread_add_event(master, ospf6_dbdesc_send, on, 0,
-                        &on->thread_send_dbdesc);
-
+       event_add_event(master, ospf6_dbdesc_send, on, 0,
+                       &on->thread_send_dbdesc);
 }
 
-void oneway_received(struct thread *thread)
+void oneway_received(struct event *thread)
 {
        struct ospf6_neighbor *on;
 
-       on = (struct ospf6_neighbor *)THREAD_ARG(thread);
+       on = (struct ospf6_neighbor *)EVENT_ARG(thread);
        assert(on);
 
        if (on->state < OSPF6_NEIGHBOR_TWOWAY)
@@ -566,23 +555,23 @@ void oneway_received(struct thread *thread)
 
        ospf6_neighbor_state_change(OSPF6_NEIGHBOR_INIT, on,
                                    OSPF6_NEIGHBOR_EVENT_ONEWAY_RCVD);
-       thread_add_event(master, neighbor_change, on->ospf6_if, 0, NULL);
+       event_add_event(master, neighbor_change, on->ospf6_if, 0, NULL);
 
        ospf6_neighbor_clear_ls_lists(on);
 
-       THREAD_OFF(on->thread_send_dbdesc);
-       THREAD_OFF(on->thread_send_lsreq);
-       THREAD_OFF(on->thread_send_lsupdate);
-       THREAD_OFF(on->thread_send_lsack);
-       THREAD_OFF(on->thread_exchange_done);
-       THREAD_OFF(on->thread_adj_ok);
+       EVENT_OFF(on->thread_send_dbdesc);
+       EVENT_OFF(on->thread_send_lsreq);
+       EVENT_OFF(on->thread_send_lsupdate);
+       EVENT_OFF(on->thread_send_lsack);
+       EVENT_OFF(on->thread_exchange_done);
+       EVENT_OFF(on->thread_adj_ok);
 }
 
-void inactivity_timer(struct thread *thread)
+void inactivity_timer(struct event *thread)
 {
        struct ospf6_neighbor *on;
 
-       on = (struct ospf6_neighbor *)THREAD_ARG(thread);
+       on = (struct ospf6_neighbor *)EVENT_ARG(thread);
        assert(on);
 
        if (IS_OSPF6_DEBUG_NEIGHBOR(EVENT))
@@ -598,8 +587,7 @@ void inactivity_timer(struct thread *thread)
                ospf6_neighbor_state_change(
                        OSPF6_NEIGHBOR_DOWN, on,
                        OSPF6_NEIGHBOR_EVENT_INACTIVITY_TIMER);
-               thread_add_event(master, neighbor_change, on->ospf6_if, 0,
-                                NULL);
+               event_add_event(master, neighbor_change, on->ospf6_if, 0, NULL);
 
                listnode_delete(on->ospf6_if->neighbor_list, on);
                ospf6_neighbor_delete(on);
@@ -610,9 +598,9 @@ void inactivity_timer(struct thread *thread)
                                "%s, Acting as HELPER for this neighbour, So restart the dead timer.",
                                __PRETTY_FUNCTION__);
 
-               thread_add_timer(master, inactivity_timer, on,
-                                on->ospf6_if->dead_interval,
-                                &on->inactivity_timer);
+               event_add_timer(master, inactivity_timer, on,
+                               on->ospf6_if->dead_interval,
+                               &on->inactivity_timer);
        }
 }
 
@@ -827,7 +815,7 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
 
 
                timerclear(&res);
-               if (thread_is_scheduled(on->thread_send_dbdesc))
+               if (event_is_scheduled(on->thread_send_dbdesc))
                        timersub(&on->thread_send_dbdesc->u.sands, &now, &res);
                timerstring(&res, duration, sizeof(duration));
                json_object_int_add(json_neighbor, "pendingLsaDbDescCount",
@@ -836,8 +824,8 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
                                       duration);
                json_object_string_add(
                        json_neighbor, "dbDescSendThread",
-                       (thread_is_scheduled(on->thread_send_dbdesc) ? "on"
-                                                                    : "off"));
+                       (event_is_scheduled(on->thread_send_dbdesc) ? "on"
+                                                                   : "off"));
                json_array = json_object_new_array();
                for (ALL_LSDB(on->dbdesc_list, lsa, lsanext))
                        json_object_array_add(
@@ -846,7 +834,7 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
                                       json_array);
 
                timerclear(&res);
-               if (thread_is_scheduled(on->thread_send_lsreq))
+               if (event_is_scheduled(on->thread_send_lsreq))
                        timersub(&on->thread_send_lsreq->u.sands, &now, &res);
                timerstring(&res, duration, sizeof(duration));
                json_object_int_add(json_neighbor, "pendingLsaLsReqCount",
@@ -855,8 +843,8 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
                                       duration);
                json_object_string_add(
                        json_neighbor, "lsReqSendThread",
-                       (thread_is_scheduled(on->thread_send_lsreq) ? "on"
-                                                                   : "off"));
+                       (event_is_scheduled(on->thread_send_lsreq) ? "on"
+                                                                  : "off"));
                json_array = json_object_new_array();
                for (ALL_LSDB(on->request_list, lsa, lsanext))
                        json_object_array_add(
@@ -866,7 +854,7 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
 
 
                timerclear(&res);
-               if (thread_is_scheduled(on->thread_send_lsupdate))
+               if (event_is_scheduled(on->thread_send_lsupdate))
                        timersub(&on->thread_send_lsupdate->u.sands, &now,
                                 &res);
                timerstring(&res, duration, sizeof(duration));
@@ -876,9 +864,8 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
                                       duration);
                json_object_string_add(
                        json_neighbor, "lsUpdateSendThread",
-                       (thread_is_scheduled(on->thread_send_lsupdate)
-                                ? "on"
-                                : "off"));
+                       (event_is_scheduled(on->thread_send_lsupdate) ? "on"
+                                                                     : "off"));
                json_array = json_object_new_array();
                for (ALL_LSDB(on->lsupdate_list, lsa, lsanext))
                        json_object_array_add(
@@ -887,7 +874,7 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
                                       json_array);
 
                timerclear(&res);
-               if (thread_is_scheduled(on->thread_send_lsack))
+               if (event_is_scheduled(on->thread_send_lsack))
                        timersub(&on->thread_send_lsack->u.sands, &now, &res);
                timerstring(&res, duration, sizeof(duration));
                json_object_int_add(json_neighbor, "pendingLsaLsAckCount",
@@ -896,8 +883,8 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
                                       duration);
                json_object_string_add(
                        json_neighbor, "lsAckSendThread",
-                       (thread_is_scheduled(on->thread_send_lsack) ? "on"
-                                                                   : "off"));
+                       (event_is_scheduled(on->thread_send_lsack) ? "on"
+                                                                  : "off"));
                json_array = json_object_new_array();
                for (ALL_LSDB(on->lsack_list, lsa, lsanext))
                        json_object_array_add(
@@ -985,52 +972,51 @@ static void ospf6_neighbor_show_detail(struct vty *vty,
                        vty_out(vty, "      %s\n", lsa->name);
 
                timerclear(&res);
-               if (thread_is_scheduled(on->thread_send_dbdesc))
+               if (event_is_scheduled(on->thread_send_dbdesc))
                        timersub(&on->thread_send_dbdesc->u.sands, &now, &res);
                timerstring(&res, duration, sizeof(duration));
                vty_out(vty,
                        "    %d Pending LSAs for DbDesc in Time %s [thread %s]\n",
                        on->dbdesc_list->count, duration,
-                       (thread_is_scheduled(on->thread_send_dbdesc) ? "on"
-                                                                    : "off"));
+                       (event_is_scheduled(on->thread_send_dbdesc) ? "on"
+                                                                   : "off"));
                for (ALL_LSDB(on->dbdesc_list, lsa, lsanext))
                        vty_out(vty, "      %s\n", lsa->name);
 
                timerclear(&res);
-               if (thread_is_scheduled(on->thread_send_lsreq))
+               if (event_is_scheduled(on->thread_send_lsreq))
                        timersub(&on->thread_send_lsreq->u.sands, &now, &res);
                timerstring(&res, duration, sizeof(duration));
                vty_out(vty,
                        "    %d Pending LSAs for LSReq in Time %s [thread %s]\n",
                        on->request_list->count, duration,
-                       (thread_is_scheduled(on->thread_send_lsreq) ? "on"
-                                                                   : "off"));
+                       (event_is_scheduled(on->thread_send_lsreq) ? "on"
+                                                                  : "off"));
                for (ALL_LSDB(on->request_list, lsa, lsanext))
                        vty_out(vty, "      %s\n", lsa->name);
 
                timerclear(&res);
-               if (thread_is_scheduled(on->thread_send_lsupdate))
+               if (event_is_scheduled(on->thread_send_lsupdate))
                        timersub(&on->thread_send_lsupdate->u.sands, &now,
                                 &res);
                timerstring(&res, duration, sizeof(duration));
                vty_out(vty,
                        "    %d Pending LSAs for LSUpdate in Time %s [thread %s]\n",
                        on->lsupdate_list->count, duration,
-                       (thread_is_scheduled(on->thread_send_lsupdate)
-                                ? "on"
-                                : "off"));
+                       (event_is_scheduled(on->thread_send_lsupdate) ? "on"
+                                                                     : "off"));
                for (ALL_LSDB(on->lsupdate_list, lsa, lsanext))
                        vty_out(vty, "      %s\n", lsa->name);
 
                timerclear(&res);
-               if (thread_is_scheduled(on->thread_send_lsack))
+               if (event_is_scheduled(on->thread_send_lsack))
                        timersub(&on->thread_send_lsack->u.sands, &now, &res);
                timerstring(&res, duration, sizeof(duration));
                vty_out(vty,
                        "    %d Pending LSAs for LSAck in Time %s [thread %s]\n",
                        on->lsack_list->count, duration,
-                       (thread_is_scheduled(on->thread_send_lsack) ? "on"
-                                                                   : "off"));
+                       (event_is_scheduled(on->thread_send_lsack) ? "on"
+                                                                  : "off"));
                for (ALL_LSDB(on->lsack_list, lsa, lsanext))
                        vty_out(vty, "      %s\n", lsa->name);