diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2012-05-03 14:04:56 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2012-05-03 14:04:56 +0200 |
commit | e14bd38087ed8ef1945dd0a3878cc560478145f0 (patch) | |
tree | a120496db04af14f21b7c43266588eced9841e99 /sysdep | |
parent | ab188fb76d7822350724b182106a19995a73d719 (diff) |
Fixes flushing of device routes.
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/unix/krt.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index bf098774..2bd1bc44 100644 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@ -575,16 +575,11 @@ krt_flush_routes(struct krt_proto *p) { net *n = (net *) f; rte *e = n->routes; - if (e) + if (e && (n->n.flags & KRF_INSTALLED)) { - rta *a = e->attrs; - if ((n->n.flags & KRF_INSTALLED) && - a->source != RTS_DEVICE && a->source != RTS_INHERIT) - { - /* 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; - } + /* 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; |