diff options
| author | Yash Ranjan <ranjany@vmware.com> | 2021-02-18 04:38:11 -0800 |
|---|---|---|
| committer | Yash Ranjan <ranjany@vmware.com> | 2021-02-18 20:36:13 -0800 |
| commit | 2727b66027ef998d4730cff2ab21bb557d5bedec (patch) | |
| tree | 75062c3ae16a266fde1266727ed644e1defbd695 /ospf6d | |
| parent | 1d73eba70d7884319b7cad06e391e399b9e81b0e (diff) | |
ospf6d: Metric option in intra-prefix LSA detail
Signed-off-by: Yash Ranjan <ranjany@vmware.com>
Diffstat (limited to 'ospf6d')
| -rw-r--r-- | ospf6d/ospf6_intra.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 2abe64ac60..5394ba9786 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); |
