diff options
| author | Mark Stapp <mstapp@nvidia.com> | 2021-09-17 16:32:27 -0400 |
|---|---|---|
| committer | Mark Stapp <mstapp@nvidia.com> | 2022-02-25 09:53:02 -0500 |
| commit | b6beb70047f008a956f2e30cd581211d0e2d6672 (patch) | |
| tree | 0351889b9c89cf7bb3a61dc748255cfde3eb5614 /zebra/interface.c | |
| parent | c9781f524c3ca17584c86c0e1f4d68dd8b8d4348 (diff) | |
zebra: include mpls enabled status in interface output
Add mpls status to the zebra interface struct; include mpls
status in show interface output.
Signed-off-by: Mark Stapp <mstapp@nvidia.com>
Diffstat (limited to 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index 5d1080fd72..7dd7e49479 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1670,6 +1670,9 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp) vty_out(vty, "mtu6 %d ", ifp->mtu6); vty_out(vty, "\n flags: %s\n", if_flag_dump(ifp->flags)); + if (zebra_if->mpls) + vty_out(vty, " MPLS enabled\n"); + /* Hardware address. */ vty_out(vty, " Type: %s\n", if_link_type_str(ifp->ll_type)); if (ifp->hw_addr_len != 0) { @@ -1990,6 +1993,8 @@ static void if_dump_vty_json(struct vty *vty, struct interface *ifp, json_object_string_add(json_if, "OsDescription", zebra_if->desc); + json_object_boolean_add(json_if, "mplsEnabled", zebra_if->mpls); + if (ifp->ifindex == IFINDEX_INTERNAL) { json_object_boolean_add(json_if, "pseudoInterface", true); return; |
