summaryrefslogtreecommitdiffstats
path: root/zebra/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 8a9225ac..4ba92ba8 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -632,12 +632,30 @@ connected_dump_vty (struct vty *vty, struct connected *connected)
if (CHECK_FLAG (connected->flags, ZEBRA_IFA_SECONDARY))
vty_out (vty, " secondary");
+ if (CHECK_FLAG (connected->flags, ZEBRA_IFA_UNNUMBERED))
+ vty_out (vty, " unnumbered");
+
if (connected->label)
vty_out (vty, " %s", connected->label);
vty_out (vty, "%s", VTY_NEWLINE);
}
+/* Dump interface neighbor address information to vty. */
+static void
+nbr_connected_dump_vty (struct vty *vty, struct nbr_connected *connected)
+{
+ struct prefix *p;
+
+ /* Print interface address. */
+ p = connected->address;
+ vty_out (vty, " %s ", prefix_family_str (p));
+ prefix_vty_out (vty, p);
+ vty_out (vty, "/%d", p->prefixlen);
+
+ vty_out (vty, "%s", VTY_NEWLINE);
+}
+
#if defined (HAVE_RTADV)
/* Dump interface ND information to vty. */
static void
@@ -706,6 +724,7 @@ static void
if_dump_vty (struct vty *vty, struct interface *ifp)
{
struct connected *connected;
+ struct nbr_connected *nbr_connected;
struct listnode *node;
struct route_node *rn;
struct zebra_if *zebra_if;
@@ -793,6 +812,10 @@ if_dump_vty (struct vty *vty, struct interface *ifp)
#if defined (HAVE_RTADV)
nd_dump_vty (vty, ifp);
#endif /* HAVE_RTADV */
+ if (listhead(ifp->nbr_connected))
+ vty_out (vty, " Neighbor address(s):%s", VTY_NEWLINE);
+ for (ALL_LIST_ELEMENTS_RO (ifp->nbr_connected, node, nbr_connected))
+ nbr_connected_dump_vty (vty, nbr_connected);
#ifdef HAVE_PROC_NET_DEV
/* Statistics print out using proc file system. */
@@ -1381,6 +1404,12 @@ ip_address_install (struct vty *vty, struct interface *ifp,
return CMD_WARNING;
}
+ if (ipv4_martian(&cp.prefix))
+ {
+ vty_out (vty, "%% Invalid address%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
ifc = connected_check (ifp, (struct prefix *) &cp);
if (! ifc)
{
@@ -1565,6 +1594,12 @@ ipv6_address_install (struct vty *vty, struct interface *ifp,
return CMD_WARNING;
}
+ if (ipv6_martian(&cp.prefix))
+ {
+ vty_out (vty, "%% Invalid address%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
ifc = connected_check (ifp, (struct prefix *) &cp);
if (! ifc)
{