Merge pull request #8392 from idryzhov/ospf-ignore-dup

ospfd: ignore duplicated "ip ospf area" commands
This commit is contained in:
Donald Sharp 2021-04-02 12:33:11 -04:00 committed by GitHub
commit 6f8a5e6157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8968,9 +8968,12 @@ DEFUN (ip_ospf_area,
// update/create address-level params
params = ospf_get_if_params((ifp), (addr));
if (OSPF_IF_PARAM_CONFIGURED(params, if_area)) {
vty_out(vty,
"Must remove previous area/address config before changing ospf area\n");
return CMD_WARNING_CONFIG_FAILED;
if (!IPV4_ADDR_SAME(&params->if_area, &area_id)) {
vty_out(vty,
"Must remove previous area/address config before changing ospf area\n");
return CMD_WARNING_CONFIG_FAILED;
} else
return CMD_SUCCESS;
}
ospf_if_update_params((ifp), (addr));
}