summaryrefslogtreecommitdiff
path: root/ldpd/ldp_vty_exec.c
diff options
context:
space:
mode:
authorlynne <lynne@voltanet.io>2020-05-07 12:31:40 -0400
committerlynne <lynne@voltanet.io>2020-05-11 16:22:52 -0400
commit6bbdd9e97997aa5f6ed2468e2d21b8163c9ecb51 (patch)
tree81b6e9bb7ee5d8575e123defe77204ba905811b7 /ldpd/ldp_vty_exec.c
parenta9b763e381188e6761fc09d0bbddea94595387c3 (diff)
ldpd and Zebra: Expand existing debug commands.
L2VPN PW are very hard to determine why they do not come up. The following fixes expand the existing show commands in ldp and zebra to display a reason why the PW is in the DOWN state and also display the labeled nexthop route selected to reach the PW peer. By adding this information it will provide the user some guidance on how to debug the PW issue. Also fixed an assert if labels were changed for a PW that is between directly connected peers. Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Diffstat (limited to 'ldpd/ldp_vty_exec.c')
-rw-r--r--ldpd/ldp_vty_exec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ldpd/ldp_vty_exec.c b/ldpd/ldp_vty_exec.c
index d317da7b20..d74017c7e2 100644
--- a/ldpd/ldp_vty_exec.c
+++ b/ldpd/ldp_vty_exec.c
@@ -1256,6 +1256,8 @@ show_l2vpn_binding_msg(struct vty *vty, struct imsg *imsg,
"GroupID: %u\n", "", pw->local_cword,
pw_type_name(pw->type),pw->local_gid);
vty_out (vty, "%-8sMTU: %u\n", "",pw->local_ifmtu);
+ vty_out (vty, "%-8sLast failure: %s\n", "",
+ pw_error_code(pw->reason));
} else
vty_out (vty," Local Label: unassigned\n");
@@ -1309,6 +1311,8 @@ show_l2vpn_binding_msg_json(struct imsg *imsg, struct show_params *params,
pw->local_gid);
json_object_int_add(json_pw, "localIfMtu",
pw->local_ifmtu);
+ json_object_string_add(json_pw, "lastFailureReason",
+ pw_error_code(pw->reason));
} else
json_object_string_add(json_pw, "localLabel",
"unassigned");