summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_neighbor.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_neighbor.c')
-rw-r--r--ospf6d/ospf6_neighbor.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c
index 6f2795a56d..1a8fedea0c 100644
--- a/ospf6d/ospf6_neighbor.c
+++ b/ospf6d/ospf6_neighbor.c
@@ -48,7 +48,7 @@
#include "ospf6_gr.h"
#include "lib/json.h"
-DEFINE_MTYPE(OSPF6D, OSPF6_NEIGHBOR, "OSPF6 neighbor");
+DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_NEIGHBOR, "OSPF6 neighbor");
DEFINE_HOOK(ospf6_neighbor_change,
(struct ospf6_neighbor * on, int state, int next_state),
@@ -168,6 +168,9 @@ void ospf6_neighbor_delete(struct ospf6_neighbor *on)
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);
+
THREAD_OFF(on->gr_helper_info.t_grace_timer);
bfd_sess_free(&on->bfd_session);
@@ -603,6 +606,8 @@ int oneway_received(struct thread *thread)
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);
return 0;
}
@@ -1068,10 +1073,7 @@ static void ospf6_neighbor_show_detail_common(struct vty *vty,
json_object_object_add(json, "neighbors", json_array);
else
json_object_free(json_array);
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
- json_object_free(json);
+ vty_json(vty, json);
}
}
@@ -1143,12 +1145,8 @@ static int ospf6_neighbor_show_common(struct vty *vty, int argc,
(*showfunc)(vty, on, json, uj);
}
- if (uj) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
- json_object_free(json);
- }
+ if (uj)
+ vty_json(vty, json);
return CMD_SUCCESS;
}
@@ -1249,7 +1247,6 @@ DEFUN (no_debug_ospf6,
OSPF6_STR)
{
unsigned int i;
- struct ospf6_lsa_handler *handler = NULL;
OSPF6_DEBUG_ABR_OFF();
OSPF6_DEBUG_ASBR_OFF();
@@ -1259,13 +1256,7 @@ DEFUN (no_debug_ospf6,
OSPF6_DEBUG_FLOODING_OFF();
OSPF6_DEBUG_INTERFACE_OFF();
- for (i = 0; i < vector_active(ospf6_lsa_handler_vector); i++) {
- handler = vector_slot(ospf6_lsa_handler_vector, i);
-
- if (handler != NULL) {
- UNSET_FLAG(handler->lh_debug, OSPF6_LSA_DEBUG);
- }
- }
+ ospf6_lsa_debug_set_all(false);
for (i = 0; i < 6; i++)
OSPF6_DEBUG_MESSAGE_OFF(i,