summaryrefslogtreecommitdiff
path: root/babeld/babeld.c
diff options
context:
space:
mode:
authorJuliusz Chroboczek <jch@pps.jussieu.fr>2012-02-07 05:43:36 +0100
committerPaul Jakma <paul@quagga.net>2012-03-25 17:06:53 +0100
commit38846de1fd7fa9005933564de28360fb9bdf02bb (patch)
treeec52e9591640b5edbb3b868d487191ec9e324199 /babeld/babeld.c
parente19ed8c4516621be74b9a28c887185fc66b67430 (diff)
babeld: Error handling and tweaks for babeld commands.
Diffstat (limited to 'babeld/babeld.c')
-rw-r--r--babeld/babeld.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 33b5d9e1..da074349 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -608,6 +608,7 @@ DEFUN (router_babel,
/* Notice to user we couldn't create Babel. */
if (ret < 0) {
zlog_warn ("can't create Babel");
+ return CMD_WARNING;
}
}
@@ -666,9 +667,11 @@ DEFUN (babel_set_protocol_port,
"Set the protocol port (default is defined in RFC).\n"
"IPv6 address")
{
- int port = atoi(argv[0]);
- protocol_port = port;
+ int port;
+ VTY_GET_INTEGER_RANGE("port", port, argv[0], 1, 0xFFFF);
+
+ protocol_port = port;
return CMD_SUCCESS;
}