]> git.proxmox.com Git - mirror_frr.git/commit - ospf6d/ospf6_nssa.c
ospf6d: stop refreshing type-5 from NSSA
authorckishimo <carles.kishimoto@gmail.com>
Fri, 26 Nov 2021 23:14:07 +0000 (00:14 +0100)
committerckishimo <carles.kishimoto@gmail.com>
Wed, 5 Jan 2022 17:19:32 +0000 (18:19 +0100)
commit35ee59fb57cfb36732a54c6514a0f5cb381b79fa
tree32d7d4933c0e6933dddf7aba91d99598658a73d1
parente2144103f81c5bd46f734bc94e1dbc0aebb66f6e
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>
ospf6d/ospf6_nssa.c