summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 732e900bbd..6486c01430 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1081,12 +1081,10 @@ static void connected_dump_vty(struct vty *vty, struct connected *connected)
vty_out(vty, "/%d", p->prefixlen);
/* If there is destination address, print it. */
- if (connected->destination) {
- vty_out(vty,
- (CONNECTED_PEER(connected) ? " peer " : " broadcast "));
+ if (CONNECTED_PEER(connected) && connected->destination) {
+ vty_out(vty, " peer ");
prefix_vty_out(vty, connected->destination);
- if (CONNECTED_PEER(connected))
- vty_out(vty, "/%d", connected->destination->prefixlen);
+ vty_out(vty, "/%d", connected->destination->prefixlen);
}
if (CHECK_FLAG(connected->flags, ZEBRA_IFA_SECONDARY))
@@ -1382,26 +1380,35 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp)
struct zebra_l2info_brslave *br_slave;
br_slave = &zebra_if->brslave_info;
- if (br_slave->bridge_ifindex != IFINDEX_INTERNAL)
- vty_out(vty, " Master (bridge) ifindex %u\n",
- br_slave->bridge_ifindex);
+ if (br_slave->bridge_ifindex != IFINDEX_INTERNAL) {
+ if (br_slave->br_if)
+ vty_out(vty, " Master interface: %s\n",
+ br_slave->br_if->name);
+ else
+ vty_out(vty, " Master ifindex: %u\n",
+ 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 (bond_slave->bond_ifindex != IFINDEX_INTERNAL) {
+ if (bond_slave->bond_if)
+ vty_out(vty, " Master interface: %s\n",
+ bond_slave->bond_if->name);
+ else
+ vty_out(vty, " Master 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)
- vty_out(vty, "(%s)\n", zebra_if->link->name);
+ vty_out(vty, " Parent interface: %s\n", zebra_if->link->name);
else
- vty_out(vty, "(Unknown)\n");
+ vty_out(vty, " Parent ifindex: %d\n", zebra_if->link_ifindex);
}
if (HAS_LINK_PARAMS(ifp)) {
@@ -2675,12 +2682,6 @@ static int ip_address_install(struct vty *vty, struct interface *ifp,
p = prefix_ipv4_new();
*p = pp;
ifc->destination = (struct prefix *)p;
- } else if (p->prefixlen <= IPV4_MAX_PREFIXLEN - 2) {
- p = prefix_ipv4_new();
- *p = lp;
- p->prefix.s_addr = ipv4_broadcast_addr(p->prefix.s_addr,
- p->prefixlen);
- ifc->destination = (struct prefix *)p;
}
/* Label. */