diff options
author | Timo Teräs <timo.teras@iki.fi> | 2016-03-30 13:44:03 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-03-30 14:29:40 +0300 |
commit | 8cb40c91cdfb00ddf04e88d3ecd40403890d90f7 (patch) | |
tree | 6d6a3de27525820abb740f1fa8347b6f03986bad /zebra/interface.c | |
parent | 86c5d2ee68f7b9c00ae4aeb5c8b3c5d82c5ebffc (diff) | |
download | quagga-8cb40c91cdfb00ddf04e88d3ecd40403890d90f7.tar.bz2 quagga-8cb40c91cdfb00ddf04e88d3ecd40403890d90f7.tar.xz |
cumulus take-3cumulus-take-3
Diffstat (limited to 'zebra/interface.c')
-rw-r--r-- | zebra/interface.c | 35 |
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) { |