2003-06-19 Paul Jakma <paul@dishone.st>

	* ospf_lsa.c (router_lsa_flags): Set the correct flags for
	  router-lsa's. Eg OSPF_FLAG_ASBR is /not/ an LSA flag, its an
	  internal ospfd flag (just happens to have same value as
	  ROUTER_LSA_EXTERNAL). Set ROUTER_LSA_EXTERNAL for ASBRs,
	  ROUTER_LSA_BORDER for ABRs and ROUTER_LSA_NT for NSSA ABRs which
	  are OSPF_NSSA_ROLE_ALWAYS translators.
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index 34cbc44..3c4d696 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -438,7 +438,22 @@
 
   /* ASBR can't exit in stub area. */
   if (area->external_routing == OSPF_AREA_STUB)
-    UNSET_FLAG (flags, OSPF_FLAG_ASBR);
+    UNSET_FLAG (flags, ROUTER_LSA_EXTERNAL);
+  /* If ASBR set External flag */
+  else if (IS_OSPF_ASBR (area->ospf))
+    SET_FLAG (flags, ROUTER_LSA_EXTERNAL);
+
+  /* Set ABR dependent flags */
+  if (IS_OSPF_ABR (area->ospf))
+    {
+      SET_FLAG (flags,  ROUTER_LSA_BORDER);
+#ifdef HAVE_NSSA
+      /* If Area is NSSA and we are both ABR and unconditional translator, 
+       * set Nt bit 
+       */
+      SET_FLAG (flags, ROUTER_LSA_NT);
+#endif /* HAVE_NSSA */
+    }
 
   return flags;
 }