diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2021-08-19 12:14:47 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2021-08-24 11:53:36 -0300 |
| commit | 0c293b92eeefeb37203fb0e8565c77a77fc189b0 (patch) | |
| tree | fb9c93676e5e961914aa456d1031cbc9780539cf /ospf6d/ospf6_nssa.c | |
| parent | 9142948e39f331231d05e68306c94a51db36c820 (diff) | |
ospf6d: do not allow an area to be stub and NSSA at the same time
That should not be allowed under any circumstance.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_nssa.c')
| -rw-r--r-- | ospf6d/ospf6_nssa.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ospf6d/ospf6_nssa.c b/ospf6d/ospf6_nssa.c index cda92054a2..10b7d2d9f6 100644 --- a/ospf6d/ospf6_nssa.c +++ b/ospf6d/ospf6_nssa.c @@ -1198,7 +1198,7 @@ static void ospf6_check_and_originate_type7_lsa(struct ospf6_area *area) } -static void ospf6_area_nssa_update(struct ospf6_area *area) +void ospf6_area_nssa_update(struct ospf6_area *area) { if (IS_AREA_NSSA(area)) { OSPF6_OPT_CLEAR(area->options, OSPF6_OPT_E); @@ -1246,6 +1246,9 @@ int ospf6_area_nssa_set(struct ospf6 *ospf6, struct ospf6_area *area) { if (!IS_AREA_NSSA(area)) { + /* Disable stub first. */ + ospf6_area_stub_unset(ospf6, area); + SET_FLAG(area->flag, OSPF6_AREA_NSSA); if (IS_OSPF6_DEBUG_NSSA) zlog_debug("area %s nssa set", area->name); |
