diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-29 09:07:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-29 09:07:19 -0400 |
| commit | ee4958897bd735bac80e6ee40ba08412e96086f5 (patch) | |
| tree | ae07ee930d44f9c3aa98c17da421b68990e90f4c /zebra/zebra_static.c | |
| parent | 126ee21d2ed9451aefab869c482bb28c6b4f6085 (diff) | |
| parent | 94758e6681f1983e0807493eb72a3bd6e7817f88 (diff) | |
Merge pull request #1060 from opensourcerouting/oldbits-2
zebra: clean up blackhole support
Diffstat (limited to 'zebra/zebra_static.c')
| -rw-r--r-- | zebra/zebra_static.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/zebra/zebra_static.c b/zebra/zebra_static.c index 6815916faf..51bbf2a0cc 100644 --- a/zebra/zebra_static.c +++ b/zebra/zebra_static.c @@ -91,7 +91,8 @@ void static_install_route(afi_t afi, safi_t safi, struct prefix *p, si->ifindex); break; case STATIC_BLACKHOLE: - nexthop = route_entry_nexthop_blackhole_add(re); + nexthop = route_entry_nexthop_blackhole_add(re, + si->bh_type); break; case STATIC_IPV6_GATEWAY: nexthop = route_entry_nexthop_ipv6_add(re, @@ -166,7 +167,8 @@ void static_install_route(afi_t afi, safi_t safi, struct prefix *p, si->ifindex); break; case STATIC_BLACKHOLE: - nexthop = route_entry_nexthop_blackhole_add(re); + nexthop = route_entry_nexthop_blackhole_add(re, + si->bh_type); break; case STATIC_IPV6_GATEWAY: nexthop = route_entry_nexthop_ipv6_add(re, @@ -187,9 +189,6 @@ void static_install_route(afi_t afi, safi_t safi, struct prefix *p, si->snh_label.num_labels, &si->snh_label.label[0]); - /* Save the flags of this static routes (reject, blackhole) */ - re->flags = si->flags; - if (IS_ZEBRA_DEBUG_RIB) { char buf[INET6_ADDRSTRLEN]; if (IS_ZEBRA_DEBUG_RIB) { @@ -364,7 +363,7 @@ void static_uninstall_route(afi_t afi, safi_t safi, struct prefix *p, int static_add_route(afi_t afi, safi_t safi, u_char type, struct prefix *p, struct prefix_ipv6 *src_p, union g_addr *gate, - const char *ifname, u_char flags, + const char *ifname, enum blackhole_type bh_type, route_tag_t tag, u_char distance, struct zebra_vrf *zvrf, struct static_nh_label *snh_label) { @@ -405,7 +404,7 @@ int static_add_route(afi_t afi, safi_t safi, u_char type, struct prefix *p, if ((distance == si->distance) && (tag == si->tag) && !memcmp(&si->snh_label, snh_label, sizeof(struct static_nh_label)) - && si->flags == flags) { + && si->bh_type == bh_type) { route_unlock_node(rn); return 0; } else @@ -424,7 +423,7 @@ int static_add_route(afi_t afi, safi_t safi, u_char type, struct prefix *p, si->type = type; si->distance = distance; - si->flags = flags; + si->bh_type = bh_type; si->tag = tag; si->vrf_id = zvrf_id(zvrf); if (ifname) |
