diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2017-08-28 06:01:13 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2017-08-28 06:03:36 +0200 |
commit | 94758e6681f1983e0807493eb72a3bd6e7817f88 (patch) | |
tree | cdc841f5c903a546e5b45932dbd80521196223e5 /zebra/zserv.c | |
parent | zebra: netlink: get blackhole routes from kernel (diff) | |
download | frr-94758e6681f1983e0807493eb72a3bd6e7817f88.tar.xz frr-94758e6681f1983e0807493eb72a3bd6e7817f88.zip |
lib, zebra: carry blackhole type over ZAPI
Allow daemons to add blackholes of specific types (reject/drop.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to '')
-rw-r--r-- | zebra/zserv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/zserv.c b/zebra/zserv.c index 46dfe3781..d60c8c936 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -626,6 +626,7 @@ int zsend_redistribute_route(int cmd, struct zserv *client, struct prefix *p, api_nh->type = nexthop->type; switch (nexthop->type) { case NEXTHOP_TYPE_BLACKHOLE: + api_nh->bh_type = nexthop->bh_type; break; case NEXTHOP_TYPE_IPV4: api_nh->gate.ipv4 = nexthop->gate.ipv4; @@ -1051,7 +1052,6 @@ static int zread_route_add(struct zserv *client, u_short length, struct route_entry *re; struct nexthop *nexthop = NULL; int i, ret; - enum blackhole_type bh_type = BLACKHOLE_NULL; s = client->ibuf; if (zapi_route_decode(s, &api) < 0) @@ -1094,7 +1094,8 @@ static int zread_route_add(struct zserv *client, u_short length, api_nh->ifindex); break; case NEXTHOP_TYPE_BLACKHOLE: - route_entry_nexthop_blackhole_add(re, bh_type); + route_entry_nexthop_blackhole_add(re, + api_nh->bh_type); break; } |