diff options
Diffstat (limited to 'ospf6d/ospf6_route.c')
| -rw-r--r-- | ospf6d/ospf6_route.c | 45 |
1 files changed, 6 insertions, 39 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 35b567c768..f5d60d80fa 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -704,27 +704,6 @@ struct ospf6_route *ospf6_route_add(struct ospf6_route *route, } if (old) { - /* if route does not actually change, return unchanged */ - if (ospf6_route_is_identical(old, route)) { - if (IS_OSPF6_DEBUG_ROUTE(MEMORY)) - zlog_debug( - "%s %p: route add %p: needless update of %p old cost %u", - ospf6_route_table_name(table), - (void *)table, (void *)route, - (void *)old, old->path.cost); - else if (IS_OSPF6_DEBUG_ROUTE(TABLE)) - zlog_debug("%s: route add: needless update", - ospf6_route_table_name(table)); - - ospf6_route_delete(route); - SET_FLAG(old->flag, OSPF6_ROUTE_ADD); - ospf6_route_table_assert(table); - - /* to free the lookup lock */ - route_unlock_node(node); - return old; - } - if (IS_OSPF6_DEBUG_ROUTE(MEMORY)) zlog_debug( "%s %p: route add %p cost %u paths %u nh %u: update of %p cost %u paths %u nh %u", @@ -1631,12 +1610,8 @@ int ospf6_route_table_show(struct vty *vty, int argc_start, int argc, /* Give summary of this route table */ if (summary) { ospf6_route_show_table_summary(vty, table, json, use_json); - if (use_json) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); - json_object_free(json); - } + if (use_json) + vty_json(vty, json); return CMD_SUCCESS; } @@ -1650,12 +1625,8 @@ int ospf6_route_table_show(struct vty *vty, int argc_start, int argc, ospf6_route_show_table_prefix(vty, &prefix, table, json, use_json); - if (use_json) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); - json_object_free(json); - } + if (use_json) + vty_json(vty, json); return CMD_SUCCESS; } @@ -1668,12 +1639,8 @@ int ospf6_route_table_show(struct vty *vty, int argc_start, int argc, else ospf6_route_show_table(vty, detail, table, json, use_json); - if (use_json) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); - json_object_free(json); - } + if (use_json) + vty_json(vty, json); return CMD_SUCCESS; } |
