From 7021c425a9f5bd9f62b934124becbaadd961cac0 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 15 Jul 2003 12:52:22 +0000 Subject: 2003-07-15 Paul Jakma * lib/version.h: add ZEBRA_URL (unused for now) * lib/vty.c: CMD_ERR_NOTHING_TODO when reading conf file should not be fatal. slight reformating. * ospfd/ospf_zebra.c: ignore reject/blackhole routes if zebra sends these type of routes. probably should be a new type of route to allow daemons to more easily choose whether to redistribute them - rathen than just a flag (eg for reject/blackhole). reorder the is_prefix_default test for ZEBRA_IPV4_ROUTE_DELETE to avoid the inverted test - slightly more readable. * redhat/zebra.spec.in: Add ospfapi port to services file, if with_ospfapi. * zebra/rib.h: Change nexthop types to an enum. * zebra/rt_netlink.c: run it through indent -nut. Add nexthop_types_desc[] descriptive array for nexthop types. (netlink_route_multipath) debug statements indicate which branch they are in and print out nexthop type. * zebra/zebra_rib.c: slight reformatting. * zebra/zebra_vty.c: Pass ZEBRA_FLAG_BLACKHOLE flag to static_add_ipv4() if Null0 route is configured. print out Null0 if STATIC_IPV4_BLACKHOLE route, and ignore flags (shouldnt be possible to set flags from vty) for config and show route. --- ospfd/ospf_zebra.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'ospfd') diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 7101d56f..34be6969 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -809,6 +809,15 @@ ospf_zebra_read_ipv4 (int command, struct zclient *zclient, if (command == ZEBRA_IPV4_ROUTE_ADD) { + /* XXX|HACK|TODO|FIXME: + * ignore reject/blackhole routes + * need a better generalised solution for these types + * really. + */ + if ( CHECK_FLAG (api.flags, ZEBRA_FLAG_BLACKHOLE) + || CHECK_FLAG (api.flags, ZEBRA_FLAG_REJECT)) + return 0; + ei = ospf_external_info_add (api.type, p, ifindex, nexthop); if (ospf->router_id.s_addr == 0) @@ -841,10 +850,10 @@ ospf_zebra_read_ipv4 (int command, struct zclient *zclient, else /* if (command == ZEBRA_IPV4_ROUTE_DELETE) */ { ospf_external_info_delete (api.type, p); - if (!is_prefix_default (&p)) - ospf_external_lsa_flush (ospf, api.type, &p, ifindex, nexthop); - else + if (is_prefix_default (&p)) ospf_external_lsa_refresh_default (ospf); + else + ospf_external_lsa_flush (ospf, api.type, &p, ifindex, nexthop); } return 0; -- cgit v1.2.1