summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorDinesh Dutt <didutt@gmail.com>2018-11-10 15:54:43 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-11-12 11:40:33 -0500
commitb9368db98c961678f030e1a27202e89b5e1ef6bf (patch)
tree9c8d4203207e8f9648b9a28b656394d0b4b0d4c1 /zebra/interface.c
parent5c5e0c0b352c75b9615d3a41714c2b0b21b67cba (diff)
zebra: Let zebra know about bond and blond slave intf types
The interface type can be a bond or a bond slave, add some code to note this and to display it as part of a show interface command. Signed-off-by: Dinesh Dutt <didutt@gmail.com> Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index afb08f7012..76e0a09c17 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1150,6 +1150,15 @@ static const char *zebra_ziftype_2str(zebra_iftype_t zif_type)
return "VETH";
break;
+ case ZEBRA_IF_BOND:
+ return "bond";
+
+ case ZEBRA_IF_BOND_SLAVE:
+ return "bond_slave";
+
+ case ZEBRA_IF_MACVLAN:
+ return "macvlan";
+
default:
return "Unknown";
break;
@@ -1279,6 +1288,15 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp)
br_slave->bridge_ifindex);
}
+ if (IS_ZEBRA_IF_BOND_SLAVE(ifp)) {
+ struct zebra_l2info_bondslave *bond_slave;
+
+ bond_slave = &zebra_if->bondslave_info;
+ if (bond_slave->bond_ifindex != IFINDEX_INTERNAL)
+ vty_out(vty, " Master (bond) ifindex %u\n",
+ bond_slave->bond_ifindex);
+ }
+
if (zebra_if->link_ifindex != IFINDEX_INTERNAL) {
vty_out(vty, " Link ifindex %u", zebra_if->link_ifindex);
if (zebra_if->link)