diff options
author | Juliusz Chroboczek <jch@pps.jussieu.fr> | 2012-02-07 05:43:36 +0100 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2012-03-25 17:06:53 +0100 |
commit | 38846de1fd7fa9005933564de28360fb9bdf02bb (patch) | |
tree | ec52e9591640b5edbb3b868d487191ec9e324199 /babeld/babel_interface.c | |
parent | e19ed8c4516621be74b9a28c887185fc66b67430 (diff) |
babeld: Error handling and tweaks for babeld commands.
Diffstat (limited to 'babeld/babel_interface.c')
-rw-r--r-- | babeld/babel_interface.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c index a874289c..906f349e 100644 --- a/babeld/babel_interface.c +++ b/babeld/babel_interface.c @@ -429,13 +429,14 @@ DEFUN (babel_set_hello_interval, { struct interface *ifp; babel_interface_nfo *babel_ifp; + int interval; - int interval = atoi(argv[0]); + VTY_GET_INTEGER_RANGE("hello interval", interval, argv[0], 20, 10 * 0xFFFE); ifp = vty->index; babel_ifp = babel_get_if_nfo(ifp); - assert (babel_ifp != NULL); + babel_ifp->hello_interval = interval; return CMD_SUCCESS; } @@ -450,7 +451,7 @@ DEFUN (babel_passive_interface, if (allow_duplicates) { return CMD_WARNING; } - parasitic = -1; + parasitic = 1; return CMD_SUCCESS; } @@ -900,7 +901,7 @@ DEFUN (show_babel_running_config, vty_out(vty, " -- Babel running configuration --%s", VTY_NEWLINE); show_babel_main_configuration(vty); show_babeld_configuration(vty); - vty_out(vty, " -- ditribution lists --%s", VTY_NEWLINE); + vty_out(vty, " -- distribution lists --%s", VTY_NEWLINE); config_show_distribute(vty); return CMD_SUCCESS; |