diff options
| author | David Lamparter <equinox@diac24.net> | 2012-04-11 23:52:46 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-08-28 01:21:43 +0200 |
| commit | 09a484dd1d27580d98c4b94d3ed77e47d7aac0b5 (patch) | |
| tree | ac178c846ddabfe4d6c80d5f6b5f4ba6025bbea2 /ospfd/ospf_zebra.c | |
| parent | 3df31ebb0328b4b84fa11d5fbd956dcc30c44dfe (diff) | |
*: remove ZEBRA_FLAG_{BLACKHOLE,REJECT} from API
FLAG_BLACKHOLE is used for different things in different places. remove
it from the zclient API, instead indicate blackholes as proper nexthops
inside the message.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospf_zebra.c')
| -rw-r--r-- | ospfd/ospf_zebra.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index dcb392f1ad..e26a33c35f 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -442,9 +442,9 @@ void ospf_zebra_add_discard(struct prefix_ipv4 *p) api.vrf_id = VRF_DEFAULT; api.type = ZEBRA_ROUTE_OSPF; api.instance = ospf->instance; - api.flags = ZEBRA_FLAG_BLACKHOLE; api.safi = SAFI_UNICAST; memcpy(&api.prefix, p, sizeof(*p)); + zapi_route_set_blackhole(&api, BLACKHOLE_NULL); zclient_route_send(ZEBRA_ROUTE_ADD, zclient, &api); @@ -462,9 +462,9 @@ void ospf_zebra_delete_discard(struct prefix_ipv4 *p) api.vrf_id = VRF_DEFAULT; api.type = ZEBRA_ROUTE_OSPF; api.instance = ospf->instance; - api.flags = ZEBRA_FLAG_BLACKHOLE; api.safi = SAFI_UNICAST; memcpy(&api.prefix, p, sizeof(*p)); + zapi_route_set_blackhole(&api, BLACKHOLE_NULL); zclient_route_send(ZEBRA_ROUTE_DELETE, zclient, &api); @@ -900,17 +900,10 @@ static int ospf_zebra_read_route(int command, struct zclient *zclient, if (command == ZEBRA_REDISTRIBUTE_ROUTE_ADD) { /* XXX|HACK|TODO|FIXME: - * Maybe we should ignore reject/blackhole routes? Testing shows - * that - * there is no problems though and this is only way to - * "summarize" - * routes in ASBR at the moment. Maybe we need just a better - * generalised - * solution for these types? - * - * if ( CHECK_FLAG (api.flags, ZEBRA_FLAG_BLACKHOLE) - * || CHECK_FLAG (api.flags, ZEBRA_FLAG_REJECT)) - * return 0; + * Maybe we should ignore reject/blackhole routes? Testing + * shows that there is no problems though and this is only way + * to "summarize" routes in ASBR at the moment. Maybe we need + * just a better generalised solution for these types? */ /* Protocol tag overwrites all other tag value sent by zebra */ |
