Browse Source

Merge svn revisions 978-979 from Zebra CVS.

hasso 18 years ago
parent
commit
63069ad68c
3 changed files with 15 additions and 6 deletions
  1. 5 0
      ospf6d/ChangeLog
  2. 8 5
      ospf6d/ospf6_abr.c
  3. 2 1
      ospf6d/ospf6_asbr.c

+ 5 - 0
ospf6d/ChangeLog

@@ -1,3 +1,8 @@
+2004-09-02  Yasuhiro Ohara  <yasu@sfc.wide.ad.jp>
+
+	* ospf6_asbr.c: E-bit check in examining AS-External-LSA
+	* ospf6_abr.c: E-bit set in receiving Inter-Area-Router-LSA
+
 2004-09-02  Yasuhiro Ohara  <yasu@sfc.wide.ad.jp>
 
 	* *.[ch]: Logging LSAs of particular type is added.

+ 8 - 5
ospf6d/ospf6_abr.c

@@ -498,6 +498,7 @@ ospf6_abr_examin_summary (struct ospf6_lsa *lsa, struct ospf6_area *oa)
   char options[3] = {0, 0, 0};
   u_int8_t prefix_options = 0;
   u_int32_t cost = 0;
+  u_char router_bits = 0;
   int i;
   char buf[64];
   int is_debug = 0;
@@ -543,6 +544,7 @@ ospf6_abr_examin_summary (struct ospf6_lsa *lsa, struct ospf6_area *oa)
       options[1] = router_lsa->options[1];
       options[2] = router_lsa->options[2];
       cost = OSPF6_ABR_SUMMARY_METRIC (router_lsa);
+      SET_FLAG (router_bits, OSPF6_ROUTER_BIT_E);
     }
   else
     assert (0);
@@ -567,7 +569,7 @@ ospf6_abr_examin_summary (struct ospf6_lsa *lsa, struct ospf6_area *oa)
       if (is_debug)
         zlog_info ("cost is LS_INFINITY, ignore");
       if (old)
-        ospf6_route_remove (old, oa->ospf6->route_table);
+        ospf6_route_remove (old, table);
       return;
     }
   if (OSPF6_LSA_IS_MAXAGE (lsa))
@@ -575,7 +577,7 @@ ospf6_abr_examin_summary (struct ospf6_lsa *lsa, struct ospf6_area *oa)
       if (is_debug)
         zlog_info ("LSA is MaxAge, ignore");
       if (old)
-        ospf6_route_remove (old, oa->ospf6->route_table);
+        ospf6_route_remove (old, table);
       return;
     }
 
@@ -585,7 +587,7 @@ ospf6_abr_examin_summary (struct ospf6_lsa *lsa, struct ospf6_area *oa)
       if (is_debug)
         zlog_info ("LSA is self-originated, ignore");
       if (old)
-        ospf6_route_remove (old, oa->ospf6->route_table);
+        ospf6_route_remove (old, table);
       return;
     }
 
@@ -598,7 +600,7 @@ ospf6_abr_examin_summary (struct ospf6_lsa *lsa, struct ospf6_area *oa)
           if (is_debug)
             zlog_info ("Prefix is equal to address range, ignore");
           if (old)
-            ospf6_route_remove (old, oa->ospf6->route_table);
+            ospf6_route_remove (old, table);
           return;
         }
     }
@@ -613,7 +615,7 @@ ospf6_abr_examin_summary (struct ospf6_lsa *lsa, struct ospf6_area *oa)
       if (is_debug)
         zlog_info ("ABR router entry does not exist, ignore");
       if (old)
-        ospf6_route_remove (old, oa->ospf6->route_table);
+        ospf6_route_remove (old, table);
       return;
     }
 
@@ -630,6 +632,7 @@ ospf6_abr_examin_summary (struct ospf6_lsa *lsa, struct ospf6_area *oa)
   route->path.origin.type = lsa->header->type;
   route->path.origin.id = lsa->header->id;
   route->path.origin.adv_router = lsa->header->adv_router;
+  route->path.router_bits = router_bits;
   route->path.options[0] = options[0];
   route->path.options[1] = options[1];
   route->path.options[2] = options[2];

+ 2 - 1
ospf6d/ospf6_asbr.c

@@ -194,7 +194,8 @@ ospf6_asbr_lsa_add (struct ospf6_lsa *lsa)
 
   ospf6_linkstate_prefix (lsa->header->adv_router, htonl (0), &asbr_id);
   asbr_entry = ospf6_route_lookup (&asbr_id, ospf6->brouter_table);
-  if (asbr_entry == NULL)
+  if (asbr_entry == NULL ||
+      ! CHECK_FLAG (asbr_entry->path.router_bits, OSPF6_ROUTER_BIT_E))
     {
       if (IS_OSPF6_DEBUG_EXAMIN (AS_EXTERNAL))
         {