diff options
| author | lynne <lynne@voltanet.io> | 2020-05-07 12:31:40 -0400 |
|---|---|---|
| committer | lynne <lynne@voltanet.io> | 2020-05-11 16:22:52 -0400 |
| commit | 6bbdd9e97997aa5f6ed2468e2d21b8163c9ecb51 (patch) | |
| tree | 81b6e9bb7ee5d8575e123defe77204ba905811b7 /ldpd/logmsg.c | |
| parent | a9b763e381188e6761fc09d0bbddea94595387c3 (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/logmsg.c')
| -rw-r--r-- | ldpd/logmsg.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ldpd/logmsg.c b/ldpd/logmsg.c index 2c9fbf0dae..6427d0e13b 100644 --- a/ldpd/logmsg.c +++ b/ldpd/logmsg.c @@ -485,3 +485,25 @@ pw_type_name(uint16_t pw_type) return (buf); } } + +const char * +pw_error_code(uint8_t status) +{ + static char buf[16]; + + switch (status) { + case F_PW_NO_ERR: + return ("No Error"); + case F_PW_LOCAL_NOT_FWD: + return ("local not forwarding"); + case F_PW_REMOTE_NOT_FWD: + return ("remote not forwarding"); + case F_PW_NO_REMOTE_LABEL: + return ("no remote label"); + case F_PW_MTU_MISMATCH: + return ("mtu mismatch between peers"); + default: + snprintf(buf, sizeof(buf), "[%0x]", status); + return (buf); + } +} |
