diff --git a/isisd/ChangeLog b/isisd/ChangeLog
index 7f3cd9d..8687ee7 100644
--- a/isisd/ChangeLog
+++ b/isisd/ChangeLog
@@ -1,5 +1,16 @@
 2005-09-26 Hasso Tepper <hasso at quagga.net>
 
+	* isis_spf.c: Changing cost from uint16_t to uint32_t. Unset
+	  ISIS_ROUTE_FLAG_ACTIVE flag before running SPF.
+	* isisd.[ch]: Separate route tables for different levels. SPF is done
+	  separately, but in case of L1L2 area they have to be merged.
+	* isis_zebra.c: Set/unset ISIS_ROUTE_FLAG_ZEBRA_SYNC flag correctly in
+	  case of adding/removing IPv4 routes.
+	* zebra_route.c: Rework route validating process. Merging L1 and L2
+	  tables in case of L1L2 area.
+
+2005-09-26 Hasso Tepper <hasso at quagga.net>
+
 	* isis_spf.[ch]: Added TE TLVs to the SPF process. It seems to work
 	  mostly, but needs certainly much more testing, especially transition
 	  situation.
diff --git a/isisd/isis_route.c b/isisd/isis_route.c
index 7cee89e..e451312 100644
--- a/isisd/isis_route.c
+++ b/isisd/isis_route.c
@@ -451,7 +451,8 @@
 
 struct isis_route_info *
 isis_route_create (struct prefix *prefix, u_int32_t cost, u_int32_t depth,
-		   struct list *adjacencies, struct isis_area *area)
+		   struct list *adjacencies, struct isis_area *area,
+		   int level)
 {
   struct route_node *route_node;
   struct isis_route_info *rinfo_new, *rinfo_old, *route_info = NULL;
@@ -471,10 +472,10 @@
     }
 
   if (family == AF_INET)
-    route_node = route_node_get (area->route_table, prefix);
+    route_node = route_node_get (area->route_table[level - 1], prefix);
 #ifdef HAVE_IPV6
   else if (family == AF_INET6)
-    route_node = route_node_get (area->route_table6, prefix);
+    route_node = route_node_get (area->route_table6[level - 1], prefix);
 #endif /* HAVE_IPV6 */
   else
     return NULL;
@@ -585,31 +586,23 @@
   return;
 }
 
-int
-isis_route_validate (struct thread *thread)
+/* Validating routes in particular table. */
+static void
+isis_route_validate_table (struct isis_area *area, struct route_table *table)
 {
-  struct isis_area *area;
-  struct route_table *table;
-  struct route_node *rode;
+  struct route_node *rnode, *drnode;
   struct isis_route_info *rinfo;
   u_char buff[BUFSIZ];
-#ifdef HAVE_IPV6
-  int v6done = 0;
-#endif
-  area = THREAD_ARG (thread);
-  table = area->route_table;
-#ifdef HAVE_IPV6
-again:
-#endif
-  for (rode = route_top (table); rode; rode = route_next (rode))
+
+  for (rnode = route_top (table); rnode; rnode = route_next (rnode))
     {
-      if (rode->info == NULL)
+      if (rnode->info == NULL)
 	continue;
-      rinfo = rode->info;
+      rinfo = rnode->info;
 
       if (isis->debugs & DEBUG_RTE_EVENTS)
 	{
-	  prefix2str (&rode->p, (char *) buff, BUFSIZ);
+	  prefix2str (&rnode->p, (char *) buff, BUFSIZ);
 	  zlog_debug ("ISIS-Rte (%s): route validate: %s %s %s",
 		      area->area_tag,
 		      (CHECK_FLAG (rinfo->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNC) ?
@@ -618,16 +611,131 @@
 		      "active" : "inactive"), buff);
 	}
 
-      isis_zebra_route_update (&rode->p, rinfo);
+      isis_zebra_route_update (&rnode->p, rinfo);
       if (!CHECK_FLAG (rinfo->flag, ISIS_ROUTE_FLAG_ACTIVE))
-	isis_route_delete (&rode->p, area->route_table);
+	{
+	  /* Area is either L1 or L2 => we use level route tables directly for
+	   * validating => no problems with deleting routes. */
+	  if (area->is_type != IS_LEVEL_1_AND_2)
+	    {
+	      isis_route_delete (&rnode->p, table);
+	      continue;
+	    }
+	  /* If area is L1L2, we work with merge table and therefore must
+	   * delete node from level tables as well before deleting route info.
+	   * FIXME: Is it performance problem? There has to be the better way.
+	   * Like not to deal with it here at all (see the next comment)? */
+	  if (rnode->p.family == AF_INET)
+	    {
+	      drnode = route_node_get (area->route_table[0], &rnode->p);
+	      if (drnode->info == rnode->info)
+		drnode->info = NULL;
+	      drnode = route_node_get (area->route_table[1], &rnode->p);
+	      if (drnode->info == rnode->info)
+		drnode->info = NULL;
+	    }
+	  if (rnode->p.family == AF_INET6)
+	    {
+	      drnode = route_node_get (area->route_table6[0], &rnode->p);
+	      if (drnode->info == rnode->info)
+		drnode->info = NULL;
+	      drnode = route_node_get (area->route_table6[1], &rnode->p);
+	      if (drnode->info == rnode->info)
+		drnode->info = NULL;
+	    }
+	      
+	  isis_route_delete (&rnode->p, table);
+	}
     }
+}
+
+/* Function to validate route tables for L1L2 areas. In this case we can't use
+ * level route tables directly, we have to merge them at first. L1 routes are
+ * preferred over the L2 ones.
+ *
+ * Merge algorithm is trivial (at least for now). All L1 paths are copied into
+ * merge table at first, then L2 paths are added if L1 path for same prefix
+ * doesn't already exists there.
+ *
+ * FIXME: Is it right place to do it at all? Maybe we should push both levels
+ * to the RIB with different zebra route types and let RIB handle this? */
+static void
+isis_route_validate_merge (struct isis_area *area, int family)
+{
+  struct route_table *table = NULL;
+  struct route_table *merge;
+  struct route_node *rnode, *mrnode;
+
+  merge = route_table_init ();
+
+  if (family == AF_INET)
+    table = area->route_table[0];
+  else if (family == AF_INET6)
+    table = area->route_table6[0];
+
+  for (rnode = route_top (table); rnode; rnode = route_next (rnode))
+    {
+      if (rnode->info == NULL)
+        continue;
+      mrnode = route_node_get (merge, &rnode->p);
+      mrnode->info = rnode->info;
+    }
+
+  if (family == AF_INET)
+    table = area->route_table[1];
+  else if (family == AF_INET6)
+    table = area->route_table6[1];
+
+  for (rnode = route_top (table); rnode; rnode = route_next (rnode))
+    {
+      if (rnode->info == NULL)
+        continue;
+      mrnode = route_node_get (merge, &rnode->p);
+      if (mrnode->info != NULL)
+        continue;
+      mrnode->info = rnode->info;
+    }
+
+  isis_route_validate_table (area, merge);
+  route_table_finish (merge);
+}
+
+/* Walk through route tables and propagate necessary changes into RIB. In case
+ * of L1L2 area, level tables have to be merged at first. */
+int
+isis_route_validate (struct thread *thread)
+{
+  struct isis_area *area;
+
+  area = THREAD_ARG (thread);
+
+  if (area->is_type == IS_LEVEL_1)
+    { 
+      isis_route_validate_table (area, area->route_table[0]);
+      goto validate_ipv6;
+    }
+  if (area->is_type == IS_LEVEL_2)
+    {
+      isis_route_validate_table (area, area->route_table[1]);
+      goto validate_ipv6;
+    }
+
+  isis_route_validate_merge (area, AF_INET);
+
 #ifdef HAVE_IPV6
-  if (v6done)
-    return ISIS_OK;
-  table = area->route_table6;
-  v6done = 1;
-  goto again;
+validate_ipv6:
+  if (area->is_type == IS_LEVEL_1)
+    {
+      isis_route_validate_table (area, area->route_table6[0]);
+      return ISIS_OK;
+    }
+  if (area->is_type == IS_LEVEL_2)
+    {
+      isis_route_validate_table (area, area->route_table6[1]);
+      return ISIS_OK;
+    }
+
+  isis_route_validate_merge (area, AF_INET6);
 #endif
 
   return ISIS_OK;
diff --git a/isisd/isis_route.h b/isisd/isis_route.h
index 59b6c22..4eac79b 100644
--- a/isisd/isis_route.h
+++ b/isisd/isis_route.h
@@ -57,7 +57,7 @@
 struct isis_route_info *isis_route_create (struct prefix *prefix,
 					   u_int32_t cost, u_int32_t depth,
 					   struct list *adjacencies,
-					   struct isis_area *area);
+					   struct isis_area *area, int level);
 
 int isis_route_validate (struct thread *thread);
 
diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c
index ac4c71f..4cbc2cd 100644
--- a/isisd/isis_spf.c
+++ b/isisd/isis_spf.c
@@ -394,7 +394,7 @@
  */
 static struct isis_vertex *
 isis_spf_add2tent (struct isis_spftree *spftree, enum vertextype vtype,
-		   void *id, struct isis_adjacency *adj, u_int16_t cost,
+		   void *id, struct isis_adjacency *adj, u_int32_t cost,
 		   int depth, int family)
 {
   struct isis_vertex *vertex, *v;
@@ -457,7 +457,7 @@
 
 static struct isis_vertex *
 isis_spf_add_local (struct isis_spftree *spftree, enum vertextype vtype,
-		    void *id, struct isis_adjacency *adj, u_int16_t cost,
+		    void *id, struct isis_adjacency *adj, u_int32_t cost,
 		    int family)
 {
   struct isis_vertex *vertex;
@@ -553,7 +553,7 @@
  */
 static int
 isis_spf_process_lsp (struct isis_spftree *spftree, struct isis_lsp *lsp,
-		      uint16_t cost, uint16_t depth, int family)
+		      uint32_t cost, uint16_t depth, int family)
 {
   struct listnode *node, *fragnode = NULL;
   u_int16_t dist;
@@ -945,7 +945,7 @@
  */
 static void
 add_to_paths (struct isis_spftree *spftree, struct isis_vertex *vertex,
-	      struct isis_area *area)
+	      struct isis_area *area, int level)
 {
 #ifdef EXTREME_DEBUG
   u_char buff[BUFSIZ];
@@ -960,8 +960,8 @@
   if (vertex->type > VTYPE_ES)
     {
       if (listcount (vertex->Adj_N) > 0)
-	isis_route_create ((struct prefix *) &vertex->N.prefix,
-			   vertex->d_N, vertex->depth, vertex->Adj_N, area);
+	isis_route_create ((struct prefix *) &vertex->N.prefix, vertex->d_N,
+			   vertex->depth, vertex->Adj_N, area, level);
       else if (isis->debugs & DEBUG_SPF_EVENTS)
 	zlog_debug ("ISIS-Spf: no adjacencies do not install route");
     }
@@ -989,6 +989,9 @@
   struct isis_spftree *spftree = NULL;
   u_char lsp_id[ISIS_SYS_ID_LEN + 2];
   struct isis_lsp *lsp;
+  struct route_table *table = NULL;
+  struct route_node *rode;
+  struct isis_route_info *rinfo;
 
   if (family == AF_INET)
     spftree = area->spftree[level - 1];
@@ -999,6 +1002,21 @@
 
   assert (spftree);
 
+  /* Make all routes in current route table inactive. */
+  if (family == AF_INET)
+    table = area->route_table[level - 1];
+  else if (family == AF_INET6)
+    table = area->route_table6[level - 1];
+
+  for (rode = route_top (table); rode; rode = route_next (rode))
+    {
+      if (rode->info == NULL)
+        continue;
+      rinfo = rode->info;
+
+      UNSET_FLAG (rinfo->flag, ISIS_ROUTE_FLAG_ACTIVE);
+    }
+
   /*
    * C.2.5 Step 0
    */
@@ -1026,7 +1044,7 @@
       list_delete_node (spftree->tents, node);
       if (isis_find_vertex (spftree->paths, vertex->N.id, vertex->type))
 	continue;
-      add_to_paths (spftree, vertex, area);
+      add_to_paths (spftree, vertex, area, level);
       if (vertex->type == VTYPE_PSEUDO_IS ||
 	  vertex->type == VTYPE_NONPSEUDO_IS)
 	{
@@ -1225,7 +1243,7 @@
     }
 
   if (isis->debugs & DEBUG_SPF_EVENTS)
-    zlog_debug ("ISIS-Spf (%s) L2 SPF needed, periodic SPF", area->area_tag);
+    zlog_debug ("ISIS-Spf (%s) L2 SPF needed, periodic SPF.", area->area_tag);
 
   if (area->ipv6_circuits)
     retval = isis_run_spf (area, 2, AF_INET6);
diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c
index a385e6b..aff6a71 100644
--- a/isisd/isis_zebra.c
+++ b/isisd/isis_zebra.c
@@ -308,6 +308,7 @@
 
       stream_putw_at (stream, 0, stream_get_endp (stream));
       zclient_send_message(zclient);
+      SET_FLAG (route_info->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNC);
     }
 }
 
@@ -328,6 +329,7 @@
       prefix4.prefix = prefix->u.prefix4;
       zapi_ipv4_route (ZEBRA_IPV4_ROUTE_DELETE, zclient, &prefix4, &api);
     }
+  UNSET_FLAG (route_info->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNC);
 
   return;
 }
diff --git a/isisd/isisd.c b/isisd/isisd.c
index 2a60b88..dbaae8a 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -106,9 +106,11 @@
   area->lspdb[1] = lsp_db_init ();
 
   spftree_area_init (area);
-  area->route_table = route_table_init ();
+  area->route_table[0] = route_table_init ();
+  area->route_table[1] = route_table_init ();
 #ifdef HAVE_IPV6
-  area->route_table6 = route_table_init ();
+  area->route_table6[0] = route_table_init ();
+  area->route_table6[1] = route_table_init ();
 #endif /* HAVE_IPV6 */
   area->circuit_list = list_new ();
   area->area_addrs = list_new ();
diff --git a/isisd/isisd.h b/isisd/isisd.h
index e61376e..4e71640 100644
--- a/isisd/isisd.h
+++ b/isisd/isisd.h
@@ -79,13 +79,13 @@
 
 struct isis_area
 {
-  struct isis *isis;		/* back pointer */
-  dict_t *lspdb[ISIS_LEVELS];	/* link-state dbs */
-  struct isis_spftree *spftree[ISIS_LEVELS];	/* The v4 SPTs */
-  struct route_table *route_table;	/* IPv4 routes */
+  struct isis *isis;				  /* back pointer */
+  dict_t *lspdb[ISIS_LEVELS];			  /* link-state dbs */
+  struct isis_spftree *spftree[ISIS_LEVELS];	  /* The v4 SPTs */
+  struct route_table *route_table[ISIS_LEVELS];	  /* IPv4 routes */
 #ifdef HAVE_IPV6
-  struct isis_spftree *spftree6[ISIS_LEVELS];	/* The v4 SPTs */
-  struct route_table *route_table6;	/* IPv6 routes */
+  struct isis_spftree *spftree6[ISIS_LEVELS];	  /* The v6 SPTs */
+  struct route_table *route_table6[ISIS_LEVELS];  /* IPv6 routes */
 #endif
   unsigned int min_bcast_mtu;
   struct list *circuit_list;	/* IS-IS circuits */
