summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2020-09-22 20:20:21 +0200
committerGitHub <noreply@github.com>2020-09-22 20:20:21 +0200
commite2dcd0c2c5fe2a45a9bcd34a9cdce8a9059e0ec7 (patch)
tree9302ec59632fb79223e31f5b9dac3ba414376b50 /ospfd
parentMerge pull request #7122 from ckishimo/type4 (diff)
parentldpd: update topo tests for new show isis ldp-sync command output (diff)
downloadfrr-e2dcd0c2c5fe2a45a9bcd34a9cdce8a9059e0ec7.tar.xz
frr-e2dcd0c2c5fe2a45a9bcd34a9cdce8a9059e0ec7.zip
Merge pull request #7132 from volta-networks/fix_ldp_sync_cmds
Fix ldp sync cmds
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_ldp_sync.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/ospfd/ospf_ldp_sync.c b/ospfd/ospf_ldp_sync.c
index a8c9df1c5..2c3b6705a 100644
--- a/ospfd/ospf_ldp_sync.c
+++ b/ospfd/ospf_ldp_sync.c
@@ -710,8 +710,12 @@ static int show_ip_ospf_mpls_ldp_interface_common(struct vty *vty,
struct route_node *rn;
struct ospf_interface *oi;
- if (ospf_oi_count(ifp) == 0)
+ if (ospf_oi_count(ifp) == 0 && !use_json) {
+ if (!if_is_up(ifp))
+ vty_out(vty, "%s\n Interface down\n",
+ ifp->name);
continue;
+ }
for (rn = route_top(IF_OIFS(ifp)); rn;
rn = route_next(rn)) {
oi = rn->info;
@@ -739,9 +743,12 @@ static int show_ip_ospf_mpls_ldp_interface_common(struct vty *vty,
struct ospf_interface *oi;
if (ospf_oi_count(ifp) == 0 && !use_json) {
- vty_out(vty,
- " OSPF not enabled on this interface %s\n",
- ifp->name);
+ if (if_is_up(ifp))
+ vty_out(vty, "%s\n OSPF not enabled\n",
+ ifp->name);
+ else
+ vty_out(vty, "%s\n Interface down\n",
+ ifp->name);
return CMD_SUCCESS;
}
for (rn = route_top(IF_OIFS(ifp)); rn;