Kevin C Miller <kevinm@andrew.cmu.edu>
[zebra 16681] OSPF NSSA Patches
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index ddae980..f030027 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -257,7 +257,22 @@
   oi->nbr_self = ospf_nbr_new (oi);
   oi->nbr_self->state = NSM_TwoWay;
   oi->nbr_self->priority = OSPF_IF_PARAM (oi, priority);
-  oi->nbr_self->options = OSPF_OPTION_E;
+
+  switch (oi->area->external_routing)
+    {
+    case OSPF_AREA_DEFAULT:
+      SET_FLAG (oi->nbr_self->options, OSPF_OPTION_E);
+      break;
+    case OSPF_AREA_STUB:
+      UNSET_FLAG (oi->nbr_self->options, OSPF_OPTION_E);
+      break;
+#ifdef HAVE_NSSA
+    case OSPF_AREA_NSSA:
+      UNSET_FLAG (oi->nbr_self->options, OSPF_OPTION_E);
+      SET_FLAG (oi->nbr_self->options, OSPF_OPTION_NP);
+      break;
+#endif /* HAVE_NSSA */
+    }
 
   ospf_lsa_unlock (oi->network_lsa_self);
   oi->network_lsa_self = NULL;