Merge pull request #9446 from mobash-rasool/ospfv3-bug-fixes

ospf6d: External LSAs reoriginates on every redistribute CLI
This commit is contained in:
Igor Ryzhov 2021-08-23 19:00:23 +03:00 committed by GitHub
commit 6b73885556
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1643,10 +1643,15 @@ DEFUN (ospf6_redistribute,
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
red = ospf6_redist_lookup(ospf6, type, 0); red = ospf6_redist_lookup(ospf6, type, 0);
if (!red) if (!red) {
ospf6_redist_add(ospf6, type, 0); ospf6_redist_add(ospf6, type, 0);
else } else {
/* To check, if user is providing same config */
if (ROUTEMAP_NAME(red) == NULL)
return CMD_SUCCESS;
ospf6_asbr_redistribute_unset(ospf6, red, type); ospf6_asbr_redistribute_unset(ospf6, red, type);
}
ospf6_asbr_redistribute_set(ospf6, type); ospf6_asbr_redistribute_set(ospf6, type);
@ -1674,10 +1679,16 @@ DEFUN (ospf6_redistribute_routemap,
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
red = ospf6_redist_lookup(ospf6, type, 0); red = ospf6_redist_lookup(ospf6, type, 0);
if (!red) if (!red) {
red = ospf6_redist_add(ospf6, type, 0); red = ospf6_redist_add(ospf6, type, 0);
else } else {
/* To check, if user is providing same route map */
if ((ROUTEMAP_NAME(red) != NULL)
&& (strcmp(argv[idx_word]->arg, ROUTEMAP_NAME(red)) == 0))
return CMD_SUCCESS;
ospf6_asbr_redistribute_unset(ospf6, red, type); ospf6_asbr_redistribute_unset(ospf6, red, type);
}
ospf6_asbr_routemap_set(red, argv[idx_word]->arg); ospf6_asbr_routemap_set(red, argv[idx_word]->arg);
ospf6_asbr_redistribute_set(ospf6, type); ospf6_asbr_redistribute_set(ospf6, type);