mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 08:19:59 +00:00
ospfd: Added missing fields to "show ip ospf neighbor detail"
"role" and "local interface address" fields were missing in "show ip ospf neighbor detail" command. Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
This commit is contained in:
parent
d83c36ee44
commit
5bec85d971
@ -5138,19 +5138,36 @@ static void show_ip_ospf_neighbor_detail_sub(struct vty *vty,
|
||||
json_object_string_add(json_neigh, "areaId",
|
||||
ospf_area_desc_string(oi->area));
|
||||
json_object_string_add(json_neigh, "ifaceName", oi->ifp->name);
|
||||
} else
|
||||
vty_out(vty, " In the area %s via interface %s\n",
|
||||
if (oi->address)
|
||||
json_object_string_addf(json_neigh, "localIfaceAddress",
|
||||
"%pI4",
|
||||
&oi->address->u.prefix4);
|
||||
} else {
|
||||
vty_out(vty, " In the area %s via interface %s",
|
||||
ospf_area_desc_string(oi->area), oi->ifp->name);
|
||||
if (oi->address)
|
||||
vty_out(vty, " local interface IP %pI4\n",
|
||||
&oi->address->u.prefix4);
|
||||
else
|
||||
vty_out(vty, "\n");
|
||||
}
|
||||
|
||||
/* Show neighbor priority and state. */
|
||||
ospf_nbr_ism_state_message(nbr, neigh_state, sizeof(neigh_state));
|
||||
if (use_json) {
|
||||
json_object_int_add(json_neigh, "nbrPriority", nbr->priority);
|
||||
json_object_string_add(json_neigh, "nbrState", neigh_state);
|
||||
} else
|
||||
vty_out(vty, " Neighbor priority is %d, State is %s,",
|
||||
nbr->priority, neigh_state);
|
||||
|
||||
json_object_string_add(json_neigh, "role",
|
||||
lookup_msg(ospf_ism_state_msg,
|
||||
ospf_nbr_ism_state(nbr),
|
||||
NULL));
|
||||
} else {
|
||||
vty_out(vty,
|
||||
" Neighbor priority is %d, State is %s, Role is %s,",
|
||||
nbr->priority, neigh_state,
|
||||
lookup_msg(ospf_ism_state_msg, ospf_nbr_ism_state(nbr),
|
||||
NULL));
|
||||
}
|
||||
/* Show state changes. */
|
||||
if (use_json)
|
||||
json_object_int_add(json_neigh, "stateChangeCounter",
|
||||
|
Loading…
Reference in New Issue
Block a user