Fixes flushing of device routes.
This commit is contained in:
parent
ab188fb76d
commit
e14bd38087
1 changed files with 4 additions and 9 deletions
|
@ -575,16 +575,11 @@ krt_flush_routes(struct krt_proto *p)
|
||||||
{
|
{
|
||||||
net *n = (net *) f;
|
net *n = (net *) f;
|
||||||
rte *e = n->routes;
|
rte *e = n->routes;
|
||||||
if (e)
|
if (e && (n->n.flags & KRF_INSTALLED))
|
||||||
{
|
{
|
||||||
rta *a = e->attrs;
|
/* FIXME: this does not work if gw is changed in export filter */
|
||||||
if ((n->n.flags & KRF_INSTALLED) &&
|
krt_replace_rte(p, e->net, NULL, e, NULL);
|
||||||
a->source != RTS_DEVICE && a->source != RTS_INHERIT)
|
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);
|
|
||||||
n->n.flags &= ~KRF_INSTALLED;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FIB_WALK_END;
|
FIB_WALK_END;
|
||||||
|
|
Loading…
Reference in a new issue