From: Ondrej Zajicek Date: Thu, 3 May 2012 12:04:56 +0000 (+0200) Subject: Fixes flushing of device routes. X-Git-Tag: v1.3.8~2^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e14bd38087ed8ef1945dd0a3878cc560478145f0;p=thirdparty%2Fbird.git Fixes flushing of device routes. --- diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index bf098774c..2bd1bc446 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;