summaryrefslogtreecommitdiff
path: root/ospfd/ospf_interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_interface.c')
-rw-r--r--ospfd/ospf_interface.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index ddae9800..f0300273 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -257,7 +257,22 @@ ospf_if_cleanup (struct ospf_interface *oi)
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;