summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_asbr.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_asbr.c')
-rw-r--r--ospf6d/ospf6_asbr.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index b439f947de..99f30a4a06 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -1410,7 +1410,6 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex,
struct ospf6_route *route, *match;
struct ospf6_external_info *info;
struct prefix prefix_id;
- struct route_node *node;
char ibuf[16];
struct ospf6_redist *red;
@@ -1497,13 +1496,6 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex,
else
ospf6_route_add_nexthop(match, ifindex, NULL);
- /* create/update binding in external_id_table */
- prefix_id.family = AF_INET;
- prefix_id.prefixlen = IPV4_MAX_BITLEN;
- prefix_id.u.prefix4.s_addr = htonl(info->id);
- node = route_node_get(ospf6->external_id_table, &prefix_id);
- node->info = match;
-
if (IS_OSPF6_DEBUG_ASBR) {
inet_ntop(AF_INET, &prefix_id.u.prefix4, ibuf,
sizeof(ibuf));
@@ -2553,10 +2545,7 @@ DEFUN(show_ipv6_ospf6_redistribute, show_ipv6_ospf6_redistribute_cmd,
if (uj) {
json_object_object_add(json, "routes",
json_array_routes);
- 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);
}
if (!all_vrf)
@@ -2787,7 +2776,6 @@ static void ospf6_originate_new_aggr_lsa(struct ospf6 *ospf6,
struct ospf6_external_aggr_rt *aggr)
{
struct prefix prefix_id;
- struct route_node *node;
struct ospf6_lsa *lsa = NULL;
if (IS_OSPF6_DEBUG_AGGR)
@@ -2796,13 +2784,6 @@ static void ospf6_originate_new_aggr_lsa(struct ospf6 *ospf6,
aggr->id = ospf6->external_id++;
- /* create/update binding in external_id_table */
- prefix_id.family = AF_INET;
- prefix_id.prefixlen = 32;
- prefix_id.u.prefix4.s_addr = htonl(aggr->id);
- node = route_node_get(ospf6->external_id_table, &prefix_id);
- node->info = aggr;
-
if (IS_OSPF6_DEBUG_AGGR)
zlog_debug(
"Advertise AS-External Id:%pI4 prefix %pFX metric %u",
@@ -3014,8 +2995,6 @@ static void ospf6_aggr_handle_external_info(void *data)
struct ospf6_lsa *lsa = NULL;
struct ospf6_external_info *info;
struct ospf6 *ospf6 = NULL;
- struct prefix prefix_id;
- struct route_node *node;
rt->aggr_route = NULL;
@@ -3055,13 +3034,6 @@ static void ospf6_aggr_handle_external_info(void *data)
info->id = ospf6->external_id++;
rt->path.origin.id = htonl(info->id);
- /* create/update binding in external_id_table */
- prefix_id.family = AF_INET;
- prefix_id.prefixlen = 32;
- prefix_id.u.prefix4.s_addr = htonl(info->id);
- node = route_node_get(ospf6->external_id_table, &prefix_id);
- node->info = rt;
-
(void)ospf6_originate_type5_type7_lsas(rt, ospf6);
}
@@ -3642,7 +3614,6 @@ void ospf6_handle_external_lsa_origination(struct ospf6 *ospf6,
struct ospf6_external_aggr_rt *aggr;
struct ospf6_external_info *info;
struct prefix prefix_id;
- struct route_node *node;
if (!is_default_prefix(p)) {
aggr = ospf6_external_aggr_match(ospf6,
@@ -3678,14 +3649,6 @@ void ospf6_handle_external_lsa_origination(struct ospf6 *ospf6,
*/
if (!info->id) {
info->id = ospf6->external_id++;
-
- /* create/update binding in external_id_table */
- prefix_id.family = AF_INET;
- prefix_id.prefixlen = 32;
- prefix_id.u.prefix4.s_addr = htonl(info->id);
- node = route_node_get(ospf6->external_id_table, &prefix_id);
- node->info = rt;
-
} else {
prefix_id.family = AF_INET;
prefix_id.prefixlen = 32;