diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2021-07-02 12:38:11 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-02 12:38:11 -0400 |
| commit | 30885c7099c8c0621a4b7522b5e1efb49148043e (patch) | |
| tree | ef6b3c3e3e178ee42d7bc63f94e10916faf03078 /ospf6d/ospf6_asbr.c | |
| parent | 8a0ac82d963d20f254e0e4c33c42aef95b74286d (diff) | |
Revert "ospf6d: fix LSAs remain in LSDB with an old router-id value"revert-8795-fix-ospf6-router-id
Diffstat (limited to 'ospf6d/ospf6_asbr.c')
| -rw-r--r-- | ospf6d/ospf6_asbr.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 91e33c858e..d4e52f0ede 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -2484,23 +2484,21 @@ void ospf6_asbr_redistribute_disable(struct ospf6 *ospf6) int type; struct ospf6_redist *red; - for (type = 0; type <= ZEBRA_ROUTE_MAX; type++) { - if (type == ZEBRA_ROUTE_OSPF6) - continue; + for (type = 0; type < ZEBRA_ROUTE_MAX; type++) { red = ospf6_redist_lookup(ospf6, type, 0); if (!red) continue; - - if (type == DEFAULT_ROUTE) { - ospf6_asbr_routemap_unset(red); - ospf6_redist_del(ospf6, red, type); - ospf6_redistribute_default_set(ospf6, - DEFAULT_ORIGINATE_NONE); + if (type == ZEBRA_ROUTE_OSPF6) continue; - } ospf6_asbr_redistribute_unset(ospf6, red, type); ospf6_redist_del(ospf6, red, type); } + red = ospf6_redist_lookup(ospf6, DEFAULT_ROUTE, 0); + if (red) { + ospf6_asbr_routemap_unset(red); + ospf6_redist_del(ospf6, red, type); + ospf6_redistribute_default_set(ospf6, DEFAULT_ORIGINATE_NONE); + } } void ospf6_asbr_redistribute_reset(struct ospf6 *ospf6) |
