ospf6d: stop refreshing type-5 from NSSA
With the current code, in a topology like this:
r1 ---- 0.0.0.0 ---- r2(ABR) ---- 1.1.1.1 -----r3(ASBR)
NSSA
where r3 is redistributing statics within the NSSA area, the ABR (r2)
is translating type-7 lsa to type-5.
Everytime the function ospf6_abr_nssa_task() is executed all translated
type-5 are aged out and refreshed for no reason. So for instance having 3
lsas already advertised:
r1# sh ipv6 os database
AS Scoped Link State Database
Type LSId AdvRouter Age SeqNum Payload
ASE 0.0.0.1 2.2.2.2 39
80000001 3:3::3/128
ASE 0.0.0.2 2.2.2.2 39
80000001 4:4::4/128
ASE 0.0.0.3 2.2.2.2 39
80000001 5:5::5/128
Adversting a new route from r3:
r3(config)# ipv6 route 6:6::6/128 Null0
r1# sh ipv6 os database
AS Scoped Link State Database
Type LSId AdvRouter Age SeqNum Payload
ASE 0.0.0.1 2.2.2.2 124
80000001 3:3::3/128
ASE 0.0.0.2 2.2.2.2 124
80000001 4:4::4/128
ASE 0.0.0.3 2.2.2.2 124
80000001 5:5::5/128
ASE 0.0.0.4 2.2.2.2 8
80000001 6:6::6/128
That seems okay, however a few seconds later we see all prefixes refreshed
r1# sh ipv6 os database
AS Scoped Link State Database
Type LSId AdvRouter Age SeqNum Payload
ASE 0.0.0.1 2.2.2.2 3600
80000001 3:3::3/128
ASE 0.0.0.2 2.2.2.2 3600
80000001 4:4::4/128
ASE 0.0.0.3 2.2.2.2 3600
80000001 5:5::5/128
ASE 0.0.0.4 2.2.2.2 3600
80000001 6:6::6/128
ASE 0.0.0.5 2.2.2.2 3
80000001 3:3::3/128
ASE 0.0.0.6 2.2.2.2 3
80000001 4:4::4/128
ASE 0.0.0.7 2.2.2.2 3
80000001 5:5::5/128
ASE 0.0.0.8 2.2.2.2 3
80000001 6:6::6/128
This PR prevents the LSA of being refreshed by unsetting the OSPF6_LSA_UNAPPROVED
flag so advertising the last prefix will not refresh all of them:
r1# sh ipv6 os database
AS Scoped Link State Database
Type LSId AdvRouter Age SeqNum Payload
ASE 0.0.0.1 2.2.2.2 90
80000001 3:3::3/128
ASE 0.0.0.2 2.2.2.2 47
80000001 4:4::4/128
ASE 0.0.0.3 2.2.2.2 35
80000001 5:5::5/128
ASE 0.0.0.4 2.2.2.2 7
80000001 6:6::6/128
Signed-off-by: ckishimo <carles.kishimoto@gmail.com>