diff options
| author | lynne <lynne@voltanet.io> | 2020-09-18 14:32:24 -0400 |
|---|---|---|
| committer | lynne <lynne@voltanet.io> | 2020-09-21 12:07:13 -0400 |
| commit | 9919bec70a65e68577fca31bf81217545858ce47 (patch) | |
| tree | 47ef18cb9a1283bc99d20082916782abaa58e82f /ospfd/ospf_ldp_sync.c | |
| parent | eb47c1bee12c5163e11c6c157543a74543f8cf2d (diff) | |
ospfd: updates to the ldp-sync ospf commands
Improve the output of the show ip ospf mpls ldp-sync command.
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Diffstat (limited to 'ospfd/ospf_ldp_sync.c')
| -rw-r--r-- | ospfd/ospf_ldp_sync.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ospfd/ospf_ldp_sync.c b/ospfd/ospf_ldp_sync.c index a8c9df1c56..2c3b6705a3 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; |
