]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixes flushing of device routes.
authorOndrej Zajicek <santiago@crfreenet.org>
Thu, 3 May 2012 12:04:56 +0000 (14:04 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Thu, 3 May 2012 12:04:56 +0000 (14:04 +0200)
sysdep/unix/krt.c

index bf098774cb79cab063f1dddd731fe8b7a016147b..2bd1bc446c6276dbcf354a47cfbac079cc8579bd 100644 (file)
@@ -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;