mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 09:44:26 +00:00
ospf6d: harmonize ospf6_asbr_redistribute_disable and _reset
Harmonize the code of functions ospf6_asbr_redistribute_disable and ospf6_asbr_redistribute_reset. Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
parent
c54fb080a0
commit
c295917b4a
@ -2483,21 +2483,23 @@ void ospf6_asbr_redistribute_disable(struct ospf6 *ospf6)
|
|||||||
int type;
|
int type;
|
||||||
struct ospf6_redist *red;
|
struct ospf6_redist *red;
|
||||||
|
|
||||||
for (type = 0; type < ZEBRA_ROUTE_MAX; type++) {
|
for (type = 0; type <= ZEBRA_ROUTE_MAX; type++) {
|
||||||
|
if (type == ZEBRA_ROUTE_OSPF6)
|
||||||
|
continue;
|
||||||
red = ospf6_redist_lookup(ospf6, type, 0);
|
red = ospf6_redist_lookup(ospf6, type, 0);
|
||||||
if (!red)
|
if (!red)
|
||||||
continue;
|
continue;
|
||||||
if (type == ZEBRA_ROUTE_OSPF6)
|
|
||||||
|
if (type == DEFAULT_ROUTE) {
|
||||||
|
ospf6_asbr_routemap_unset(red);
|
||||||
|
ospf6_redist_del(ospf6, red, type);
|
||||||
|
ospf6_redistribute_default_set(ospf6,
|
||||||
|
DEFAULT_ORIGINATE_NONE);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
ospf6_asbr_redistribute_unset(ospf6, red, type);
|
ospf6_asbr_redistribute_unset(ospf6, red, type);
|
||||||
ospf6_redist_del(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)
|
void ospf6_asbr_redistribute_reset(struct ospf6 *ospf6)
|
||||||
|
Loading…
Reference in New Issue
Block a user