diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-08-23 19:00:23 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-23 19:00:23 +0300 |
| commit | 6b7388555605024fd6594cc998badb6bcd7069f5 (patch) | |
| tree | 745245b520f71a9c2cbd35913dd5d777444a342c | |
| parent | 95b4a691dd02d22a82296b2ec9cfbcc7b24efdf9 (diff) | |
| parent | 058c4c783f37b9b7dd4d4b6dfd9dbfb6ef532236 (diff) | |
Merge pull request #9446 from mobash-rasool/ospfv3-bug-fixes
ospf6d: External LSAs reoriginates on every redistribute CLI
| -rw-r--r-- | ospf6d/ospf6_asbr.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 5cf879b8cf..2b11d89a31 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -1643,10 +1643,15 @@ DEFUN (ospf6_redistribute, return CMD_WARNING_CONFIG_FAILED; red = ospf6_redist_lookup(ospf6, type, 0); - if (!red) + if (!red) { 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_set(ospf6, type); @@ -1674,10 +1679,16 @@ DEFUN (ospf6_redistribute_routemap, return CMD_WARNING_CONFIG_FAILED; red = ospf6_redist_lookup(ospf6, type, 0); - if (!red) + if (!red) { 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_routemap_set(red, argv[idx_word]->arg); ospf6_asbr_redistribute_set(ospf6, type); |
