summaryrefslogtreecommitdiffstats
path: root/eigrpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-10-25 01:58:14 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-10-25 01:58:14 +0200
commit984e5e52c70e4e04677b5502857ae0f912c7e867 (patch)
tree4acdc7cf641380bb0cc953781941264a62f6662e /eigrpd
parenteigrpd: Convert keychain authentication to DEFPY (diff)
downloadfrr-984e5e52c70e4e04677b5502857ae0f912c7e867.tar.xz
frr-984e5e52c70e4e04677b5502857ae0f912c7e867.zip
eigrpd: Fix bandwidth command to actually read input properly
The bandwidth command was not properly reading cli input and would do weird stuff with the input. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd')
-rw-r--r--eigrpd/eigrp_vty.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c
index 44b6254b3..a0c4fa887 100644
--- a/eigrpd/eigrp_vty.c
+++ b/eigrpd/eigrp_vty.c
@@ -661,16 +661,15 @@ DEFUN (no_eigrp_if_delay,
return CMD_SUCCESS;
}
-DEFUN (eigrp_if_bandwidth,
+DEFPY (eigrp_if_bandwidth,
eigrp_if_bandwidth_cmd,
- "eigrp bandwidth (1-10000000)",
+ "eigrp bandwidth (1-10000000)$bw",
"EIGRP specific commands\n"
"Set bandwidth informational parameter\n"
"Bandwidth in kilobits\n")
{
VTY_DECLVAR_CONTEXT(interface, ifp);
struct eigrp_interface *ei = ifp->info;
- uint32_t bandwidth;
struct eigrp *eigrp;
eigrp = eigrp_lookup();
@@ -684,9 +683,7 @@ DEFUN (eigrp_if_bandwidth,
return CMD_SUCCESS;
}
- bandwidth = atoi(argv[1]->arg);
-
- ei->params.bandwidth = bandwidth;
+ ei->params.bandwidth = bw;
eigrp_if_reset(ifp);
return CMD_SUCCESS;