Commit e14bd380 authored by Ondrej Zajicek's avatar Ondrej Zajicek
Browse files

Fixes flushing of device routes.

parent ab188fb7
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -575,18 +575,13 @@ krt_flush_routes(struct krt_proto *p)
    {
      net *n = (net *) f;
      rte *e = n->routes;
      if (e)
	{
	  rta *a = e->attrs;
	  if ((n->n.flags & KRF_INSTALLED) &&
	      a->source != RTS_DEVICE && a->source != RTS_INHERIT)
      if (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);
	  n->n.flags &= ~KRF_INSTALLED;
	}
    }
    }
  FIB_WALK_END;
}