]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: include mpls enabled status in interface output
authorMark Stapp <mstapp@nvidia.com>
Fri, 17 Sep 2021 20:32:27 +0000 (16:32 -0400)
committerMark Stapp <mstapp@nvidia.com>
Fri, 25 Feb 2022 14:53:02 +0000 (09:53 -0500)
Add mpls status to the zebra interface struct; include mpls
status in show interface output.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
zebra/interface.c
zebra/interface.h

index 5d1080fd72740e1de3dc645e3f29a7c0b004d098..7dd7e494793292bc3dbcf0b62f8a1a802dc55fd8 100644 (file)
@@ -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;
index 413a67469aa89f622f6a0e97d3f2e63a95573764..c00e1fba69cda8974737a16d0bfd791134b7123a 100644 (file)
@@ -329,6 +329,9 @@ struct zebra_if {
        /* Multicast configuration. */
        uint8_t multicast;
 
+       /* MPLS status. */
+       bool mpls;
+
        /* Router advertise configuration. */
        uint8_t rtadv_enable;