diff options
author | paul <paul> | 2003-06-22 08:22:18 +0000 |
---|---|---|
committer | paul <paul> | 2003-06-22 08:22:18 +0000 |
commit | 942b6c19895fb44041fcd4f588440619f61e6745 (patch) | |
tree | 274823fc3963e6d67ad07db2ee59bf782398db0f /ospfd | |
parent | 2e6b0bbbb44f67bd5664e6dd52c7cd4ad9286c06 (diff) |
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.
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ospf_lsa.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index 34cbc446..3c4d6961 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -438,7 +438,22 @@ router_lsa_flags (struct ospf_area *area) /* 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; } |