summaryrefslogtreecommitdiffstats
path: root/eigrpd/eigrp_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'eigrpd/eigrp_vty.c')
-rw-r--r--eigrpd/eigrp_vty.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c
index f9119b56e..01407a746 100644
--- a/eigrpd/eigrp_vty.c
+++ b/eigrpd/eigrp_vty.c
@@ -93,7 +93,7 @@ static int config_write_interfaces(struct vty *vty, struct eigrp *eigrp)
struct listnode *node;
for (ALL_LIST_ELEMENTS_RO(eigrp->eiflist, node, ei)) {
- vty_out(vty, "interface %s\n", ei->ifp->name);
+ vty_frame(vty, "interface %s\n", ei->ifp->name);
if ((IF_DEF_PARAMS(ei->ifp)->auth_type)
== EIGRP_AUTH_TYPE_MD5) {
@@ -128,7 +128,7 @@ static int config_write_interfaces(struct vty *vty, struct eigrp *eigrp)
}
/*Separate this EIGRP interface configuration from the others*/
- vty_out(vty, "!\n");
+ vty_endframe(vty, "!\n");
}
return 0;
@@ -140,7 +140,7 @@ static int eigrp_write_interface(struct vty *vty)
struct interface *ifp;
for (ALL_LIST_ELEMENTS_RO(vrf_iflist(VRF_DEFAULT), node, ifp)) {
- vty_out(vty, "interface %s\n", ifp->name);
+ vty_frame(vty, "interface %s\n", ifp->name);
if (ifp->desc)
vty_out(vty, " description %s\n", ifp->desc);
@@ -157,7 +157,7 @@ static int eigrp_write_interface(struct vty *vty)
vty_out(vty, " ip hold-time eigrp %u\n",
IF_DEF_PARAMS(ifp)->v_wait);
- vty_out(vty, "!\n");
+ vty_endframe(vty, "!\n");
}
return 0;
@@ -400,7 +400,7 @@ DEFUN (eigrp_network,
if (ret == 0) {
vty_out(vty, "There is already same network statement.\n");
- return CMD_WARNING_CONFIG_FAILED;
+ return CMD_WARNING;
}
return CMD_SUCCESS;
@@ -1267,7 +1267,11 @@ DEFUN (clear_ip_eigrp_neighbors_IP,
struct eigrp_neighbor *nbr;
struct in_addr nbr_addr;
- inet_aton(argv[4]->arg, &nbr_addr);
+ if (!inet_aton(argv[4]->arg, &nbr_addr)) {
+ vty_out(vty, "Unable to parse %s",
+ argv[4]->arg);
+ return CMD_WARNING;
+ }
/* Check if eigrp process is enabled */
eigrp = eigrp_lookup();
@@ -1370,7 +1374,11 @@ DEFUN (clear_ip_eigrp_neighbors_IP_soft,
struct eigrp_neighbor *nbr;
struct in_addr nbr_addr;
- inet_aton(argv[4]->arg, &nbr_addr);
+ if (!inet_aton(argv[4]->arg, &nbr_addr)) {
+ vty_out(vty, "Unable to parse: %s",
+ argv[4]->arg);
+ return CMD_WARNING;
+ }
/* Check if eigrp process is enabled */
eigrp = eigrp_lookup();