diff options
Diffstat (limited to 'ospf6d/ospf6_top.c')
| -rw-r--r-- | ospf6d/ospf6_top.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 7e9ed4160d..6bff52fc56 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -423,7 +423,6 @@ static struct ospf6 *ospf6_create(const char *name) * 1::1, this happened because of LS ID 0. */ o->external_id = OSPF6_EXT_INIT_LS_ID; - o->external_id_table = route_table_init(); o->write_oi_count = OSPF6_WRITE_INTERFACE_COUNT_DEFAULT; o->ref_bandwidth = OSPF6_REFERENCE_BANDWIDTH; @@ -515,7 +514,6 @@ void ospf6_delete(struct ospf6 *o) ospf6_route_table_delete(o->brouter_table); ospf6_route_table_delete(o->external_table); - route_table_finish(o->external_id_table); ospf6_distance_reset(o); route_table_finish(o->distance_table); @@ -562,6 +560,8 @@ static void ospf6_disable(struct ospf6 *o) THREAD_OFF(o->t_ospf6_receive); THREAD_OFF(o->t_external_aggr); THREAD_OFF(o->gr_info.t_grace_period); + THREAD_OFF(o->t_write); + THREAD_OFF(o->t_abr_task); } } @@ -583,8 +583,6 @@ static int ospf6_maxage_remover(struct thread *thread) struct listnode *i, *j, *k; int reschedule = 0; - o->maxage_remover = (struct thread *)NULL; - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { for (ALL_LIST_ELEMENTS_RO(oi->neighbor_list, k, on)) { @@ -1482,9 +1480,8 @@ DEFUN(show_ipv6_ospf6_vrfs, show_ipv6_ospf6_vrfs_cmd, if (uj) { json_object_int_add(json_vrf, "vrfId", vrf_id_ui); - json_object_string_add(json_vrf, "routerId", - inet_ntop(AF_INET, &router_id, - buf, sizeof(buf))); + json_object_string_addf(json_vrf, "routerId", "%pI4", + &router_id); json_object_object_add(json_vrfs, name, json_vrf); } else { @@ -1499,10 +1496,7 @@ DEFUN(show_ipv6_ospf6_vrfs, show_ipv6_ospf6_vrfs_cmd, json_object_object_add(json, "vrfs", json_vrfs); json_object_int_add(json, "totalVrfs", count); - 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); } else { if (count) vty_out(vty, "\nTotal number of OSPF VRFs: %d\n", @@ -2094,9 +2088,7 @@ DEFPY (show_ipv6_ospf6_external_aggregator, } if (uj) { - 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); } return CMD_SUCCESS; @@ -2104,9 +2096,8 @@ DEFPY (show_ipv6_ospf6_external_aggregator, static void ospf6_stub_router_config_write(struct vty *vty, struct ospf6 *ospf6) { - if (CHECK_FLAG(ospf6->flag, OSPF6_STUB_ROUTER)) { + if (CHECK_FLAG(ospf6->flag, OSPF6_STUB_ROUTER)) vty_out(vty, " stub-router administrative\n"); - } return; } |
