{
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;
}
if (allow_duplicates) {
return CMD_WARNING;
}
- parasitic = -1;
+ parasitic = 1;
return CMD_SUCCESS;
}
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;
break;
case 'P':
babel_vty_port = atoi (optarg);
- if (babel_vty_port < 0 || babel_vty_port > 0xffff
- || (babel_vty_port == 0 && optarg[0] != '0'/*atoi error*/))
+ if (babel_vty_port <= 0 || babel_vty_port > 0xffff)
babel_vty_port = BABEL_VTY_PORT;
break;
case 'u':
/* Notice to user we couldn't create Babel. */
if (ret < 0) {
zlog_warn ("can't create Babel");
+ return CMD_WARNING;
}
}
"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;
}