summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_zebra.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-05-30 02:04:17 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-05-30 02:04:17 +0200
commit5cc347c4b9b013940860d007264cf4d0eea0fdd5 (patch)
tree0c6c79fc972e68273ff77bbdfe2c805495ef6ce1 /bgpd/bgp_zebra.c
parentMerge pull request #2142 from pguibert6WIND/fs_zebra_complement (diff)
downloadfrr-5cc347c4b9b013940860d007264cf4d0eea0fdd5.tar.xz
frr-5cc347c4b9b013940860d007264cf4d0eea0fdd5.zip
bgpd: Add null0 route back for aggregate-address route created.
The aggregate-address command is not creating the null0 route. This got lost somewhere in the last year or so. Add this ability back for BGP route installs into zebra. We need this aggregate route installed into the rib because we are drawing this traffic to us irrelevant of the number of routes we do have for that prefix. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r--bgpd/bgp_zebra.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 7a6b80f3a..e4f4823e6 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -1235,13 +1235,6 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
tag = info->attr->tag;
- /*
- * When we create an aggregate route we must also install a
- * Null0 route in the RIB
- */
- if (info->sub_type == BGP_ROUTE_AGGREGATE)
- zapi_route_set_blackhole(&api, BLACKHOLE_NULL);
-
/* If the route's source is EVPN, flag as such. */
is_evpn = is_route_parent_evpn(info);
if (is_evpn)
@@ -1381,7 +1374,14 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
if (has_valid_label && !(CHECK_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE)))
SET_FLAG(api.message, ZAPI_MESSAGE_LABEL);
- if (info->sub_type != BGP_ROUTE_AGGREGATE)
+ /*
+ * When we create an aggregate route we must also
+ * install a Null0 route in the RIB, so overwrite
+ * what was written into api with a blackhole route
+ */
+ if (info->sub_type == BGP_ROUTE_AGGREGATE)
+ zapi_route_set_blackhole(&api, BLACKHOLE_NULL);
+ else
api.nexthop_num = valid_nh_count;
SET_FLAG(api.message, ZAPI_MESSAGE_METRIC);