summaryrefslogtreecommitdiff
path: root/ldpd/ldp_vty_exec.c
diff options
context:
space:
mode:
authorKaren Schoener <karen@volta.io>2020-05-28 16:36:35 -0400
committerKaren Schoener <karen@volta.io>2020-06-01 13:21:37 -0400
commitfd563cc7f35e598decdbfd6a58bae2f050143b3f (patch)
tree682f7ce1aaa6b133803c0c61e31e2c6f55d387f9 /ldpd/ldp_vty_exec.c
parent6b2210021cab645efa58a23d5a4d171fe37f305e (diff)
ldpd: Relay data plane pseudowire status in LDP notification
Provide a way for the data plane to indicate pseudowire status (such as: not forwarding, AC failure). On a data plane pseudowire install failure, data plane sets the pseudowire status. Zebra relays the pseudowire status to LDP. LDP includes the pseudowire status in the LDP notification to the LDP peer. Signed-off-by: Karen Schoener <karen@voltanet.io>
Diffstat (limited to 'ldpd/ldp_vty_exec.c')
-rw-r--r--ldpd/ldp_vty_exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldpd/ldp_vty_exec.c b/ldpd/ldp_vty_exec.c
index d74017c7e2..7bc2623eb3 100644
--- a/ldpd/ldp_vty_exec.c
+++ b/ldpd/ldp_vty_exec.c
@@ -1357,7 +1357,7 @@ show_l2vpn_pw_msg(struct vty *vty, struct imsg *imsg, struct show_params *params
vty_out (vty, "%-9s %-15s %-10u %-16s %-10s\n", pw->ifname,
inet_ntoa(pw->lsr_id), pw->pwid, pw->l2vpn_name,
- (pw->status ? "UP" : "DOWN"));
+ (pw->status == PW_FORWARDING ? "UP" : "DOWN"));
break;
case IMSG_CTL_END:
vty_out (vty, "\n");
@@ -1384,7 +1384,7 @@ show_l2vpn_pw_msg_json(struct imsg *imsg, struct show_params *params,
json_object_string_add(json_pw, "peerId", inet_ntoa(pw->lsr_id));
json_object_int_add(json_pw, "vcId", pw->pwid);
json_object_string_add(json_pw, "VpnName", pw->l2vpn_name);
- if (pw->status)
+ if (pw->status == PW_FORWARDING)
json_object_string_add(json_pw, "status", "up");
else
json_object_string_add(json_pw, "status", "down");