mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 11:15:47 +00:00
ospfd: do not install blackhole routes for ranges with "not-advertise"
Adding blackhole routes is unnecessary in that case. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
4312d66f9f
commit
271588ace0
@ -76,7 +76,8 @@ static void ospf_area_range_delete(struct ospf_area *area,
|
|||||||
{
|
{
|
||||||
struct ospf_area_range *range = rn->info;
|
struct ospf_area_range *range = rn->info;
|
||||||
|
|
||||||
if (ospf_area_range_active(range))
|
if (ospf_area_range_active(range) &&
|
||||||
|
CHECK_FLAG(range->flags, OSPF_AREA_RANGE_ADVERTISE))
|
||||||
ospf_delete_discard_route(area->ospf, area->ospf->new_table,
|
ospf_delete_discard_route(area->ospf, area->ospf->new_table,
|
||||||
(struct prefix_ipv4 *)&rn->p);
|
(struct prefix_ipv4 *)&rn->p);
|
||||||
|
|
||||||
@ -1933,25 +1934,27 @@ static void ospf_abr_manage_discard_routes(struct ospf *ospf)
|
|||||||
struct listnode *node, *nnode;
|
struct listnode *node, *nnode;
|
||||||
struct route_node *rn;
|
struct route_node *rn;
|
||||||
struct ospf_area *area;
|
struct ospf_area *area;
|
||||||
struct ospf_area_range *range;
|
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS(ospf->areas, node, nnode, area))
|
for (ALL_LIST_ELEMENTS(ospf->areas, node, nnode, area)) {
|
||||||
for (rn = route_top(area->ranges); rn; rn = route_next(rn))
|
for (rn = route_top(area->ranges); rn; rn = route_next(rn)) {
|
||||||
if ((range = rn->info) != NULL)
|
struct ospf_area_range *range;
|
||||||
if (CHECK_FLAG(range->flags,
|
|
||||||
OSPF_AREA_RANGE_ADVERTISE)) {
|
range = rn->info;
|
||||||
if (ospf_area_range_active(range))
|
if (!range)
|
||||||
ospf_add_discard_route(
|
continue;
|
||||||
ospf, ospf->new_table,
|
|
||||||
area,
|
if (ospf_area_range_active(range)
|
||||||
(struct prefix_ipv4
|
&& CHECK_FLAG(range->flags,
|
||||||
*)&rn->p);
|
OSPF_AREA_RANGE_ADVERTISE))
|
||||||
else
|
ospf_add_discard_route(
|
||||||
ospf_delete_discard_route(
|
ospf, ospf->new_table, area,
|
||||||
ospf, ospf->new_table,
|
(struct prefix_ipv4 *)&rn->p);
|
||||||
(struct prefix_ipv4
|
else
|
||||||
*)&rn->p);
|
ospf_delete_discard_route(
|
||||||
}
|
ospf, ospf->new_table,
|
||||||
|
(struct prefix_ipv4 *)&rn->p);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is the function taking care about ABR NSSA, i.e. NSSA
|
/* This is the function taking care about ABR NSSA, i.e. NSSA
|
||||||
|
Loading…
Reference in New Issue
Block a user