diff options
Diffstat (limited to 'ospfd/ospf_vty.c')
| -rw-r--r-- | ospfd/ospf_vty.c | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index db8e961b8b..3819478cfc 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -286,7 +286,7 @@ DEFPY (ospf_router_id, for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) if (area->full_nbrs) { vty_out(vty, - "For this router-id change to take effect, use “clear ip ospf process” command\n"); + "For this router-id change to take effect, use \"clear ip ospf process\" command\n"); return CMD_SUCCESS; } @@ -319,7 +319,7 @@ DEFUN_HIDDEN (ospf_router_id_old, for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) if (area->full_nbrs) { vty_out(vty, - "For this router-id change to take effect, use “clear ip ospf process” command\n"); + "For this router-id change to take effect, use \"clear ip ospf process\" command\n"); return CMD_SUCCESS; } @@ -352,7 +352,7 @@ DEFPY (no_ospf_router_id, for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) if (area->full_nbrs) { vty_out(vty, - "For this router-id change to take effect, use “clear ip ospf process” command\n"); + "For this router-id change to take effect, use \"clear ip ospf process\" command\n"); return CMD_SUCCESS; } @@ -10027,7 +10027,7 @@ DEFUN (ospf_external_route_aggregation, str2prefix_ipv4(argv[idx]->arg, &p); - if (is_prefix_default(&p)) { + if (is_default_prefix4(&p)) { vty_out(vty, "Default address shouldn't be configured as summary address.\n"); return CMD_SUCCESS; @@ -10068,7 +10068,7 @@ DEFUN (no_ospf_external_route_aggregation, str2prefix_ipv4(argv[idx]->arg, &p); - if (is_prefix_default(&p)) { + if (is_default_prefix4(&p)) { vty_out(vty, "Default address shouldn't be configured as summary address.\n"); return CMD_SUCCESS; @@ -10361,7 +10361,7 @@ DEFUN (ospf_external_route_aggregation_no_adrvertise, str2prefix_ipv4(argv[idx]->arg, &p); - if (is_prefix_default(&p)) { + if (is_default_prefix4(&p)) { vty_out(vty, "Default address shouldn't be configured as summary address.\n"); return CMD_SUCCESS; @@ -10397,7 +10397,7 @@ DEFUN (no_ospf_external_route_aggregation_no_adrvertise, str2prefix_ipv4(argv[idx]->arg, &p); - if (is_prefix_default(&p)) { + if (is_default_prefix4(&p)) { vty_out(vty, "Default address shouldn't be configured as summary address.\n"); return CMD_SUCCESS; @@ -11389,6 +11389,11 @@ DEFPY (clear_ip_ospf_neighbor, if (!ospf->oi_running) continue; + if (nbr_id_str && IPV4_ADDR_SAME(&ospf->router_id, &nbr_id)) { + vty_out(vty, "Self router-id is not allowed.\r\n "); + return CMD_SUCCESS; + } + ospf_neighbor_reset(ospf, nbr_id, nbr_id_str); } @@ -12250,6 +12255,18 @@ static int ospf_cfg_write_helper_dis_rtr_walkcb(struct hash_bucket *bucket, return HASHWALK_CONTINUE; } +static void config_write_ospf_gr(struct vty *vty, struct ospf *ospf) +{ + if (!ospf->gr_info.restart_support) + return; + + if (ospf->gr_info.grace_period == OSPF_DFLT_GRACE_INTERVAL) + vty_out(vty, " graceful-restart\n"); + else + vty_out(vty, " graceful-restart grace-period %u\n", + ospf->gr_info.grace_period); +} + static int config_write_ospf_gr_helper(struct vty *vty, struct ospf *ospf) { if (ospf->is_helper_supported) @@ -12464,7 +12481,8 @@ static int ospf_config_write_one(struct vty *vty, struct ospf *ospf) /* Redistribute information print. */ config_write_ospf_redistribute(vty, ospf); - /* Print gr helper configs */ + /* Graceful Restart print */ + config_write_ospf_gr(vty, ospf); config_write_ospf_gr_helper(vty, ospf); /* Print external route aggregation. */ |
