From 2727b66027ef998d4730cff2ab21bb557d5bedec Mon Sep 17 00:00:00 2001 From: Yash Ranjan Date: Thu, 18 Feb 2021 04:38:11 -0800 Subject: [PATCH] ospf6d: Metric option in intra-prefix LSA detail Signed-off-by: Yash Ranjan --- ospf6d/ospf6_intra.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 2abe64ac6..5394ba978 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -989,10 +989,15 @@ static int ospf6_intra_prefix_lsa_show(struct vty *vty, struct ospf6_lsa *lsa, buf, prefix->prefix_length); json_object_string_add(json_loop, "prefix", prefix_string); + json_object_int_add(json_loop, "metric", + ntohs(prefix->prefix_metric)); json_object_array_add(json_arr, json_loop); - } else + } else { vty_out(vty, " Prefix: %s/%d\n", buf, prefix->prefix_length); + vty_out(vty, " Metric: %d\n", + ntohs(prefix->prefix_metric)); + } } if (use_json) json_object_object_add(json_obj, "prefix", json_arr); -- 2.39.5