]> git.proxmox.com Git - mirror_frr.git/blobdiff - eigrpd/eigrp_vty.c
Merge pull request #1078 from dwalton76/ospfd-network-cmd-warning
[mirror_frr.git] / eigrpd / eigrp_vty.c
index dfd965bf6a1ef287a5147f329ec0dd029305e857..d4d3bb36926cee0267bc8b5437e9bc1551a4a9cc 100644 (file)
@@ -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;
@@ -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();