mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Allows rejected routes to be kept and examined.
When 'import keep rejected' protocol option is activated, routes rejected by the import filter are kept in the routing table, but they are hidden and not propagated to other protocols. It is possible to examine them using 'show route rejected'.
This commit is contained in:
@@ -581,7 +581,7 @@ krt_flush_routes(struct krt_proto *p)
|
||||
{
|
||||
net *n = (net *) f;
|
||||
rte *e = n->routes;
|
||||
if (e && (n->n.flags & KRF_INSTALLED))
|
||||
if (rte_is_valid(e) && (n->n.flags & KRF_INSTALLED))
|
||||
{
|
||||
/* FIXME: this does not work if gw is changed in export filter */
|
||||
krt_replace_rte(p, e->net, NULL, e, NULL);
|
||||
@@ -656,7 +656,7 @@ krt_got_route(struct krt_proto *p, rte *e)
|
||||
}
|
||||
|
||||
old = net->routes;
|
||||
if ((net->n.flags & KRF_INSTALLED) && old)
|
||||
if ((net->n.flags & KRF_INSTALLED) && rte_is_valid(old))
|
||||
{
|
||||
/* There may be changes in route attributes, we ignore that.
|
||||
Also, this does not work well if gw is changed in export filter */
|
||||
|
Reference in New Issue
Block a user