diff options
Diffstat (limited to 'ospfd/ospf_vty.c')
| -rw-r--r-- | ospfd/ospf_vty.c | 186 |
1 files changed, 93 insertions, 93 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index bc98da45ee..fa02561ab7 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -151,7 +151,7 @@ DEFUN_NOSH (router_ospf, if (!ospf) { vty_out (vty, "There isn't active ospf instance %s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } if (argc > 2) @@ -214,7 +214,7 @@ DEFUN (ospf_router_id, if (!ret) { vty_out (vty, "Please specify Router ID by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ospf->router_id_static = router_id; @@ -249,7 +249,7 @@ DEFUN_HIDDEN (ospf_router_id_old, if (!ret) { vty_out (vty, "Please specify Router ID by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ospf->router_id_static = router_id; @@ -391,7 +391,7 @@ DEFUN (ospf_passive_interface, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_get_if_params (ifp, addr); @@ -461,7 +461,7 @@ DEFUN (no_ospf_passive_interface, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_lookup_if_params (ifp, addr); @@ -512,14 +512,14 @@ DEFUN (ospf_network_area, { vty_out (vty, "The network command is not supported in multi-instance ospf%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } if (ospf->if_ospf_cli_count > 0) { vty_out (vty, "Please remove all ip ospf area x.x.x.x commands first.%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } /* Get network prefix and Area ID. */ @@ -530,7 +530,7 @@ DEFUN (ospf_network_area, if (ret == 0) { vty_out (vty, "There is already same network statement.%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } return CMD_SUCCESS; @@ -557,7 +557,7 @@ DEFUN (no_ospf_network_area, { vty_out (vty, "The network command is not supported in multi-instance ospf%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } /* Get network prefix and Area ID. */ @@ -569,7 +569,7 @@ DEFUN (no_ospf_network_area, { vty_out (vty, "Can't find specified network area configuration.%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } return CMD_SUCCESS; @@ -877,7 +877,7 @@ ospf_vl_set_security (struct ospf_vl_data *vl_data, { vty_out (vty, "OSPF: Key %d already exists%s", vl_config->crypto_key_id, VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ck = ospf_crypt_key_new (); ck->key_id = vl_config->crypto_key_id; @@ -895,7 +895,7 @@ ospf_vl_set_security (struct ospf_vl_data *vl_data, { vty_out (vty, "OSPF: Key %d does not exist%s", vl_config->crypto_key_id, VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ospf_crypt_key_delete (IF_DEF_PARAMS (ifp)->auth_crypt, vl_config->crypto_key_id); @@ -949,7 +949,7 @@ ospf_vl_set (struct ospf *ospf, struct ospf_vl_config_data *vl_config) vl_data = ospf_find_vl_data (ospf, vl_config); if (!vl_data) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; /* Process this one first as it can have a fatal result, which can only logically occur if the virtual link exists already @@ -1038,7 +1038,7 @@ DEFUN (ospf_area_vlink, if (ret < 0) { vty_out (vty, "OSPF area ID is invalid%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ret = inet_aton (argv[idx_ipv4]->arg, &vl_config.vl_peer); @@ -1046,7 +1046,7 @@ DEFUN (ospf_area_vlink, { vty_out (vty, "Please specify valid Router ID as a.b.c.d%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } if (argc <=4) @@ -1107,7 +1107,7 @@ DEFUN (ospf_area_vlink, { vl_config.crypto_key_id = strtol (argv[i]->arg, NULL, 10); if (vl_config.crypto_key_id < 0) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; i++; if (i < argc) { @@ -1158,14 +1158,14 @@ DEFUN (no_ospf_area_vlink, if (ret < 0) { vty_out (vty, "OSPF area ID is invalid%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } area = ospf_area_lookup_by_area_id (ospf, vl_config.area_id); if (!area) { vty_out (vty, "Area does not exist%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ret = inet_aton (argv[idx_ipv4]->arg, &vl_config.vl_peer); @@ -1173,7 +1173,7 @@ DEFUN (no_ospf_area_vlink, { vty_out (vty, "Please specify valid Router ID as a.b.c.d%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } if (argc <=5) @@ -1223,11 +1223,11 @@ DEFUN (no_ospf_area_vlink, { vl_config.crypto_key_id = strtol (argv[i]->arg, NULL, 10); if (vl_config.crypto_key_id < 0) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; vl_config.md5_key = NULL; } else - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; break; } @@ -1258,14 +1258,14 @@ DEFUN (ospf_area_vlink_intervals, if (ret < 0) { vty_out (vty, "OSPF area ID is invalid%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ret = inet_aton (router_id, &vl_config.vl_peer); if (! ret) { vty_out (vty, "Please specify valid Router ID as a.b.c.d%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } for (int idx = 4; idx < argc; idx++) @@ -1304,14 +1304,14 @@ DEFUN (no_ospf_area_vlink_intervals, if (ret < 0) { vty_out (vty, "OSPF area ID is invalid%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ret = inet_aton (router_id, &vl_config.vl_peer); if (! ret) { vty_out (vty, "Please specify valid Router ID as a.b.c.d%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } for (int idx = 5; idx < argc; idx++) @@ -1361,7 +1361,7 @@ DEFUN (ospf_area_shortcut, else if (strncmp (argv[idx_enable_disable]->arg, "e", 1) == 0) mode = OSPF_SHORTCUT_ENABLE; else - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; ospf_area_shortcut_set (ospf, area, mode); @@ -1423,7 +1423,7 @@ DEFUN (ospf_area_stub, { vty_out (vty, "First deconfigure all virtual link through this area%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ospf_area_no_summary_unset (ospf, area_id); @@ -1453,7 +1453,7 @@ DEFUN (ospf_area_stub_no_summary, { vty_out (vty, "%% Area cannot be stub as it contains a virtual link%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ospf_area_no_summary_set (ospf, area_id); @@ -1520,7 +1520,7 @@ ospf_area_nssa_cmd_handler (struct vty *vty, int argc, struct cmd_token **argv, { vty_out (vty, "%% Area cannot be nssa as it contains a virtual link%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } if (argc > 3) @@ -1659,7 +1659,7 @@ DEFUN (ospf_area_default_cost, if (area->external_routing == OSPF_AREA_DEFAULT) { vty_out (vty, "The area is neither stub, nor NSSA%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } area->default_cost = cost; @@ -1702,7 +1702,7 @@ DEFUN (no_ospf_area_default_cost, if (area->external_routing == OSPF_AREA_DEFAULT) { vty_out (vty, "The area is neither stub, nor NSSA%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } area->default_cost = 1; @@ -2031,7 +2031,7 @@ DEFUN (ospf_abr_type, else if (strncmp (argv[idx_vendor]->arg, "st", 2) == 0) abr_type = OSPF_ABR_STAND; else - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; /* If ABR type value is changed, schedule ABR task. */ if (ospf->abr_type != abr_type) @@ -2067,7 +2067,7 @@ DEFUN (no_ospf_abr_type, else if (strncmp (argv[idx_vendor]->arg, "st", 2) == 0) abr_type = OSPF_ABR_STAND; else - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; /* If ABR type value is changed, schedule ABR task. */ if (ospf->abr_type == abr_type) @@ -2206,7 +2206,7 @@ DEFUN (ospf_timers_min_ls_interval, if (argc < 5) { vty_out (vty, "Insufficient arguments%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } interval = strtoul(argv[idx_number]->arg, NULL, 10); @@ -2248,7 +2248,7 @@ DEFUN (ospf_timers_min_ls_arrival, if (argc < 4) { vty_out (vty, "Insufficient arguments%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } arrival = strtoul(argv[idx_number]->arg, NULL, 10); @@ -2293,7 +2293,7 @@ DEFUN (ospf_timers_throttle_spf, if (argc < 6) { vty_out (vty, "Insufficient arguments%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } delay = strtoul(argv[idx_number]->arg, NULL, 10); @@ -2336,7 +2336,7 @@ DEFUN (ospf_timers_lsa, if (argc < 4) { vty_out (vty, "Insufficient number of arguments%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } minarrival = strtoul(argv[idx_number]->arg, NULL, 10); @@ -2550,7 +2550,7 @@ DEFUN (ospf_auto_cost_reference_bandwidth, if (refbw < 1 || refbw > 4294967) { vty_out (vty, "reference-bandwidth value is invalid%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } /* If reference bandwidth is changed. */ @@ -2609,7 +2609,7 @@ DEFUN (ospf_write_multiplier, if (write_oi_count < 1 || write_oi_count > 100) { vty_out (vty, "write-multiplier value is invalid%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ospf->write_oi_count = write_oi_count; @@ -5557,7 +5557,7 @@ DEFUN (ip_ospf_authentication_args, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_get_if_params (ifp, addr); @@ -5581,7 +5581,7 @@ DEFUN (ip_ospf_authentication_args, } vty_out (vty, "You shouldn't get here!%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } DEFUN (ip_ospf_authentication, @@ -5607,7 +5607,7 @@ DEFUN (ip_ospf_authentication, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_get_if_params (ifp, addr); @@ -5649,14 +5649,14 @@ DEFUN (no_ip_ospf_authentication_args, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_lookup_if_params (ifp, addr); if (params == NULL) { vty_out (vty, "Ip Address specified is unknown%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params->auth_type = OSPF_AUTH_NOTSET; UNSET_IF_PARAM (params, auth_type); @@ -5679,7 +5679,7 @@ DEFUN (no_ip_ospf_authentication_args, else { vty_out (vty, "Unexpected input encountered%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } /* * Here we have a case where the user has entered @@ -5739,14 +5739,14 @@ DEFUN (no_ip_ospf_authentication, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_lookup_if_params (ifp, addr); if (params == NULL) { vty_out (vty, "Ip Address specified is unknown%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params->auth_type = OSPF_AUTH_NOTSET; @@ -5819,7 +5819,7 @@ DEFUN (ip_ospf_authentication_key, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_get_if_params (ifp, addr); @@ -5865,7 +5865,7 @@ DEFUN (no_ip_ospf_authentication_key, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_lookup_if_params (ifp, addr); @@ -5927,7 +5927,7 @@ DEFUN (ip_ospf_message_digest_key, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_get_if_params (ifp, addr); @@ -5938,7 +5938,7 @@ DEFUN (ip_ospf_message_digest_key, if (ospf_crypt_key_lookup (params->auth_crypt, key_id) != NULL) { vty_out (vty, "OSPF: Key %d already exists%s", key_id, VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ck = ospf_crypt_key_new (); @@ -5994,7 +5994,7 @@ DEFUN (no_ip_ospf_message_digest_key, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_lookup_if_params (ifp, addr); @@ -6007,7 +6007,7 @@ DEFUN (no_ip_ospf_message_digest_key, if (ck == NULL) { vty_out (vty, "OSPF: Key %d does not exist%s", key_id, VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ospf_crypt_key_delete (params->auth_crypt, key_id); @@ -6062,7 +6062,7 @@ DEFUN (ip_ospf_cost, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_get_if_params (ifp, addr); @@ -6117,7 +6117,7 @@ DEFUN (no_ip_ospf_cost, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_lookup_if_params (ifp, addr); @@ -6189,7 +6189,7 @@ ospf_vty_dead_interval_set (struct vty *vty, const char *interval_str, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_get_if_params (ifp, addr); @@ -6216,7 +6216,7 @@ ospf_vty_dead_interval_set (struct vty *vty, const char *interval_str, { vty_out (vty, "Please specify dead-interval or hello-multiplier%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } SET_IF_PARAM (params, v_wait); @@ -6316,7 +6316,7 @@ DEFUN (no_ip_ospf_dead_interval, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_lookup_if_params (ifp, addr); @@ -6395,7 +6395,7 @@ DEFUN (ip_ospf_hello_interval, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_get_if_params (ifp, addr); @@ -6442,7 +6442,7 @@ DEFUN (no_ip_ospf_hello_interval, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_lookup_if_params (ifp, addr); @@ -6493,7 +6493,7 @@ DEFUN (ip_ospf_network, if (old_type == OSPF_IFTYPE_LOOPBACK) { vty_out (vty, "This is a loopback interface. Can't set network type.%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } if (argv_find (argv, argc, "broadcast", &idx)) @@ -6622,7 +6622,7 @@ DEFUN (ip_ospf_priority, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_get_if_params (ifp, addr); @@ -6684,7 +6684,7 @@ DEFUN (no_ip_ospf_priority, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_lookup_if_params (ifp, addr); @@ -6755,7 +6755,7 @@ DEFUN (ip_ospf_retransmit_interval, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_get_if_params (ifp, addr); @@ -6802,7 +6802,7 @@ DEFUN (no_ip_ospf_retransmit_interval, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_lookup_if_params (ifp, addr); @@ -6859,7 +6859,7 @@ DEFUN (ip_ospf_transmit_delay, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_get_if_params (ifp, addr); @@ -6905,7 +6905,7 @@ DEFUN (no_ip_ospf_transmit_delay, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_lookup_if_params (ifp, addr); @@ -6983,21 +6983,21 @@ DEFUN (ip_ospf_area, { vty_out (vty, "Please specify area by A.B.C.D|<0-4294967295>%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } if (memcmp (ifp->name, "VLINK", 5) == 0) { vty_out (vty, "Cannot enable OSPF on a virtual link.%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = IF_DEF_PARAMS (ifp); - if (OSPF_IF_PARAM_CONFIGURED(params, if_area)) + if (OSPF_IF_PARAM_CONFIGURED(params, if_area) && !IPV4_ADDR_SAME(¶ms->if_area, &area_id)) { vty_out (vty, "Must remove previous area config before changing ospf area %s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } // Check if we have an address arg and proccess it @@ -7009,7 +7009,7 @@ DEFUN (ip_ospf_area, { vty_out (vty, "Must remove previous area/address config before changing ospf area"); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } ospf_if_update_params ((ifp), (addr)); } @@ -7019,7 +7019,7 @@ DEFUN (ip_ospf_area, if (rn->info != NULL) { vty_out (vty, "Please remove all network commands first.%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } } @@ -7072,7 +7072,7 @@ DEFUN (no_ip_ospf_area, if (!OSPF_IF_PARAM_CONFIGURED(params, if_area)) { vty_outln (vty, "Can't find specified interface area configuration."); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } UNSET_IF_PARAM (params, if_area); @@ -7113,19 +7113,19 @@ DEFUN (ospf_redistribute_source, /* Get distribute source. */ source = proto_redistnum(AFI_IP, argv[idx_protocol]->text); if (source < 0) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; red = ospf_redist_add(ospf, source, 0); /* Get metric value. */ if (argv_find (argv, argc, "(0-16777214)", &idx)) { if (!str2metric (argv[idx]->arg, &metric)) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } /* Get metric type. */ else if (argv_find (argv, argc, "(1-2)", &idx)) { if (!str2metric_type (argv[idx]->arg, &type)) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } /* Get route-map */ else if (argv_find (argv, argc, "WORD", &idx)) { @@ -7157,7 +7157,7 @@ DEFUN (no_ospf_redistribute_source, source = proto_redistnum(AFI_IP, argv[idx_protocol]->text); if (source < 0) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; red = ospf_redist_lookup(ospf, source, 0); if (!red) @@ -7205,26 +7205,26 @@ DEFUN (ospf_redistribute_instance_source, { vty_out (vty, "Instance redistribution in non-instanced OSPF not allowed%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } if ((source == ZEBRA_ROUTE_OSPF) && (ospf->instance == instance)) { vty_out (vty, "Same instance OSPF redistribution not allowed%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } /* Get metric value. */ if (argv_find (argv, argc, "metric", &idx)) if (!str2metric (argv[idx+1]->arg, &metric)) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; idx = 3; /* Get metric type. */ if (argv_find (argv, argc, "metric-type", &idx)) if (!str2metric_type (argv[idx+1]->arg, &type)) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; red = ospf_redist_add(ospf, source, instance); @@ -7270,14 +7270,14 @@ DEFUN (no_ospf_redistribute_instance_source, { vty_out (vty, "Instance redistribution in non-instanced OSPF not allowed%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } if ((source == ZEBRA_ROUTE_OSPF) && (ospf->instance == instance)) { vty_out (vty, "Same instance OSPF redistribution not allowed%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } red = ospf_redist_lookup(ospf, source, instance); @@ -7305,7 +7305,7 @@ DEFUN (ospf_distribute_list_out, /* Get distribute source. */ source = proto_redistnum(AFI_IP, proto); if (source < 0) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; return ospf_distribute_list_out_set (ospf, source, argv[idx_word]->arg); } @@ -7326,7 +7326,7 @@ DEFUN (no_ospf_distribute_list_out, char *proto = argv[argc - 1]->text; source = proto_redistnum(AFI_IP, proto); if (source < 0) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; return ospf_distribute_list_out_unset (ospf, source, argv[idx_word]->arg); } @@ -7360,12 +7360,12 @@ DEFUN (ospf_default_information_originate, /* Get metric value */ else if (argv_find (argv, argc, "(0-16777214)", &idx)) { if (!str2metric (argv[idx]->arg, &metric)) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } /* Get metric type. */ else if (argv_find (argv, argc, "(1-2)", &idx)) { if (!str2metric_type (argv[idx]->arg, &type)) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } /* Get route-map */ else if (argv_find (argv, argc, "WORD", &idx)) @@ -7427,7 +7427,7 @@ DEFUN (ospf_default_metric, int metric = -1; if (!str2metric (argv[idx_number]->arg, &metric)) - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; ospf->default_metric = metric; @@ -7640,7 +7640,7 @@ DEFUN (ip_ospf_mtu_ignore, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_get_if_params (ifp, addr); ospf_if_update_params (ifp, addr); @@ -7683,7 +7683,7 @@ DEFUN (no_ip_ospf_mtu_ignore, { vty_out (vty, "Please specify interface address by A.B.C.D%s", VTYNL); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } params = ospf_get_if_params (ifp, addr); ospf_if_update_params (ifp, addr); @@ -7772,7 +7772,7 @@ DEFUN (ospf_max_metric_router_lsa_startup, if (argc != 1) { vty_out (vty, "%% Must supply stub-router period"); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } seconds = strtoul(argv[idx_number]->arg, NULL, 10); @@ -7828,7 +7828,7 @@ DEFUN (ospf_max_metric_router_lsa_shutdown, if (argc != 1) { vty_out (vty, "%% Must supply stub-router shutdown period"); - return CMD_WARNING; + return CMD_WARNING_CONFIG_FAILED; } seconds = strtoul(argv[idx_number]->arg, NULL, 10); |
