summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_intra.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_intra.c')
-rw-r--r--ospf6d/ospf6_intra.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c
index 2d82ff7ce8..6626b4bed5 100644
--- a/ospf6d/ospf6_intra.c
+++ b/ospf6d/ospf6_intra.c
@@ -142,19 +142,15 @@ static int ospf6_router_lsa_show(struct vty *vty, struct ospf6_lsa *lsa,
json_object_string_add(json_loop, "type", name);
json_object_int_add(json_loop, "metric",
ntohs(lsdesc->metric));
- json_object_string_add(json_loop, "interfaceId",
- inet_ntop(AF_INET,
- &lsdesc->interface_id,
- buf, sizeof(buf)));
- json_object_string_add(
- json_loop, "neighborInterfaceId",
- inet_ntop(AF_INET,
- &lsdesc->neighbor_interface_id, buf,
- sizeof(buf)));
- json_object_string_add(
- json_loop, "neighborRouterId",
- inet_ntop(AF_INET, &lsdesc->neighbor_router_id,
- buf, sizeof(buf)));
+ json_object_string_addf(
+ json_loop, "interfaceId", "%pI4",
+ (in_addr_t *)&lsdesc->interface_id);
+ json_object_string_addf(
+ json_loop, "neighborInterfaceId", "%pI4",
+ (in_addr_t *)&lsdesc->neighbor_interface_id);
+ json_object_string_addf(json_loop, "neighborRouterId",
+ "%pI4",
+ &lsdesc->neighbor_router_id);
json_object_array_add(json_arr, json_loop);
} else {
vty_out(vty, " Type: %s Metric: %d\n", name,
@@ -248,7 +244,6 @@ int ospf6_router_lsa_originate(struct thread *thread)
int count;
oa = (struct ospf6_area *)THREAD_ARG(thread);
- oa->thread_router_lsa = NULL;
if (oa->ospf6->gr_info.restart_in_progress) {
if (IS_DEBUG_OSPF6_GR)
@@ -533,7 +528,6 @@ int ospf6_network_lsa_originate(struct thread *thread)
uint16_t type;
oi = (struct ospf6_interface *)THREAD_ARG(thread);
- oi->thread_network_lsa = NULL;
/* The interface must be enabled until here. A Network-LSA of a
disabled interface (but was once enabled) should be flushed
@@ -784,7 +778,6 @@ int ospf6_link_lsa_originate(struct thread *thread)
struct ospf6_prefix *op;
oi = (struct ospf6_interface *)THREAD_ARG(thread);
- oi->thread_link_lsa = NULL;
assert(oi->area);
@@ -1030,7 +1023,6 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread)
int ls_id = 0;
oa = (struct ospf6_area *)THREAD_ARG(thread);
- oa->thread_intra_prefix_lsa = NULL;
if (oa->ospf6->gr_info.restart_in_progress) {
if (IS_DEBUG_OSPF6_GR)
@@ -1269,7 +1261,6 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread)
uint16_t type;
oi = (struct ospf6_interface *)THREAD_ARG(thread);
- oi->thread_intra_prefix_lsa = NULL;
assert(oi->area);