diff options
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) |
