summaryrefslogtreecommitdiffstats
path: root/isisd/isis_ldp_sync.c
diff options
context:
space:
mode:
authorlynne <lynne@voltanet.io>2020-09-18 20:29:30 +0200
committerlynne <lynne@voltanet.io>2020-09-19 02:01:35 +0200
commiteb47c1bee12c5163e11c6c157543a74543f8cf2d (patch)
treec86818cbb6b66cc641a88171f117cfd9708f165e /isisd/isis_ldp_sync.c
parentMerge pull request #7129 from kuldeepkash/bgp_basic_functionality (diff)
downloadfrr-eb47c1bee12c5163e11c6c157543a74543f8cf2d.tar.xz
frr-eb47c1bee12c5163e11c6c157543a74543f8cf2d.zip
isisd: updates to ldp-sync isis commands
Improve the output of the show isis mpls ldp-sync command. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Diffstat (limited to 'isisd/isis_ldp_sync.c')
-rw-r--r--isisd/isis_ldp_sync.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/isisd/isis_ldp_sync.c b/isisd/isis_ldp_sync.c
index 42928e069..51123568f 100644
--- a/isisd/isis_ldp_sync.c
+++ b/isisd/isis_ldp_sync.c
@@ -698,7 +698,12 @@ static void isis_circuit_ldp_sync_print_vty(struct isis_circuit *circuit,
return;
ldp_sync_info = circuit->ldp_sync_info;
- vty_out(vty, "%-10s\n", circuit->interface->name);
+ vty_out(vty, "%-16s\n", circuit->interface->name);
+ if (circuit->state == C_STATE_CONF) {
+ vty_out(vty, " Interface down\n");
+ return;
+ }
+
vty_out(vty, " LDP-IGP Synchronization enabled: %s\n",
ldp_sync_info->enabled == LDP_IGP_SYNC_ENABLED
? "yes"
@@ -751,6 +756,7 @@ DEFUN (show_isis_mpls_ldp_interface,
struct isis_area *area;
struct isis_circuit *circuit;
struct isis *isis = isis_lookup_by_vrfid(VRF_DEFAULT);
+ bool found = false;
if (!isis) {
vty_out(vty, "IS-IS Routing Process not enabled\n");
@@ -769,10 +775,16 @@ DEFUN (show_isis_mpls_ldp_interface,
for (ALL_LIST_ELEMENTS_RO(area->circuit_list, cnode, circuit))
if (!ifname)
isis_circuit_ldp_sync_print_vty(circuit, vty);
- else if (strcmp(circuit->interface->name, ifname) == 0)
+ else if (strcmp(circuit->interface->name, ifname)
+ == 0) {
isis_circuit_ldp_sync_print_vty(circuit, vty);
+ found = true;
+ }
}
+ if (found == false && ifname)
+ vty_out(vty, "%-16s\n ISIS not enabled\n", ifname);
+
return CMD_SUCCESS;
}