From 8fc9e007ee752a982fe47311702d7ff3b9c5b5cd Mon Sep 17 00:00:00 2001 From: JR Rivers Date: Mon, 24 Sep 2012 17:26:46 +0000 Subject: ospfd: blackhole route removal for area range ISSUE When an area range is created in which there the sub-area has routes that are smaller than the range, an ABR creates a blackhole route to cover the range. When the range is removed, the blackhole route is not removed. --A----B----C--- B is an ABR with A in area 1 and C in area 0. If A advertises `10.2.0.0/30` and `10.2.0.4/30` and B is configured with `area 0.0.0.1 range 10.2.0.0/29` a blackhole is created on B (`blackhole 10.2.0.0/29 proto zebra`). When the area/range is removed via the command line, the blackhole remains in existence even though the "range" route is removed from area 0 and the individual routes are propagated. PATCH The reason for this behavior is that, prior to this patch, the range is deleted from the area's list, so when ospf_abr_manage_discard_routes() gets called, there is nothing to clean up. The patch removes the discard route as part of the processing of the command line (ospf_area_range_unset()). Signed-off-by: JR Rivers Signed-off-by: Scott Feldman Reviewed-by: Shrijeet Mukherjee Signed-off-by: David Lamparter --- ospfd/ospf_route.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ospfd/ospf_route.h') diff --git a/ospfd/ospf_route.h b/ospfd/ospf_route.h index 5742b462..6c202b0c 100644 --- a/ospfd/ospf_route.h +++ b/ospfd/ospf_route.h @@ -159,7 +159,7 @@ extern void ospf_prune_unreachable_networks (struct route_table *); extern void ospf_prune_unreachable_routers (struct route_table *); extern int ospf_add_discard_route (struct route_table *, struct ospf_area *, struct prefix_ipv4 *); -extern void ospf_delete_discard_route (struct prefix_ipv4 *); +extern void ospf_delete_discard_route (struct route_table *, struct prefix_ipv4 *); extern int ospf_route_match_same (struct route_table *, struct prefix_ipv4 *, struct ospf_route *); -- cgit v1.2.1