Blame SOURCES/0008-designated-router.patch
|
|
52dce1 |
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
|
|
|
52dce1 |
index 69a3e4587..57ef6029a 100644
|
|
|
52dce1 |
--- a/ospfd/ospf_vty.c
|
|
|
52dce1 |
+++ b/ospfd/ospf_vty.c
|
|
|
52dce1 |
@@ -3737,6 +3737,28 @@ static void show_ip_ospf_interface_sub(struct vty *vty, struct ospf *ospf,
|
|
|
52dce1 |
vty_out(vty,
|
|
|
52dce1 |
" No backup designated router on this network\n");
|
|
|
52dce1 |
} else {
|
|
|
52dce1 |
+ nbr = ospf_nbr_lookup_by_addr(oi->nbrs, &DR(oi));
|
|
|
52dce1 |
+ if (nbr) {
|
|
|
52dce1 |
+ if (use_json) {
|
|
|
52dce1 |
+ json_object_string_add(
|
|
|
52dce1 |
+ json_interface_sub, "drId",
|
|
|
52dce1 |
+ inet_ntoa(nbr->router_id));
|
|
|
52dce1 |
+ json_object_string_add(
|
|
|
52dce1 |
+ json_interface_sub, "drAddress",
|
|
|
52dce1 |
+ inet_ntoa(nbr->address.u
|
|
|
52dce1 |
+ .prefix4));
|
|
|
52dce1 |
+ } else {
|
|
|
52dce1 |
+ vty_out(vty,
|
|
|
52dce1 |
+ " Designated Router (ID) %s",
|
|
|
52dce1 |
+ inet_ntoa(nbr->router_id));
|
|
|
52dce1 |
+ vty_out(vty,
|
|
|
52dce1 |
+ " Interface Address %s\n",
|
|
|
52dce1 |
+ inet_ntoa(nbr->address.u
|
|
|
52dce1 |
+ .prefix4));
|
|
|
52dce1 |
+ }
|
|
|
52dce1 |
+ }
|
|
|
52dce1 |
+ nbr = NULL;
|
|
|
52dce1 |
+
|
|
|
52dce1 |
nbr = ospf_nbr_lookup_by_addr(oi->nbrs, &BDR(oi));
|
|
|
52dce1 |
if (nbr == NULL) {
|
|
|
52dce1 |
if (!use_json)
|