Merge pull request #6982 from achernavin22/ospf_nssa_after_redist

ospfd: install Type-7 when NSSA enabled after redistribution
This commit is contained in:
Santosh P K 2020-09-07 18:24:41 +05:30 committed by GitHub
commit d6165cf543
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 0 deletions

View File

@ -1802,6 +1802,7 @@ static int ospf_abr_task_timer(struct thread *thread)
ospf_abr_task(ospf);
ospf_abr_nssa_task(ospf); /* if nssa-abr, then scan Type-7 LSDB */
ospf_asbr_nssa_redist_task(ospf);
return 0;
}

View File

@ -275,6 +275,30 @@ void ospf_asbr_status_update(struct ospf *ospf, uint8_t status)
ospf_router_lsa_update(ospf);
}
/* If there's redistribution configured, we need to refresh external
* LSAs in order to install Type-7 and flood to all NSSA Areas
*/
void ospf_asbr_nssa_redist_task(struct ospf *ospf)
{
int type;
for (type = 0; type < ZEBRA_ROUTE_MAX; type++) {
struct list *red_list;
struct listnode *node;
struct ospf_redist *red;
red_list = ospf->redist[type];
if (!red_list)
continue;
for (ALL_LIST_ELEMENTS_RO(red_list, node, red))
ospf_external_lsa_refresh_type(
ospf, type, red->instance, LSA_REFRESH_FORCE);
}
ospf_external_lsa_refresh_default(ospf);
}
void ospf_redistribute_withdraw(struct ospf *ospf, uint8_t type,
unsigned short instance)
{

View File

@ -72,6 +72,7 @@ extern struct external_info *ospf_external_info_lookup(struct ospf *, uint8_t,
unsigned short,
struct prefix_ipv4 *);
extern void ospf_asbr_status_update(struct ospf *, uint8_t);
extern void ospf_asbr_nssa_redist_task(struct ospf *ospf);
extern void ospf_redistribute_withdraw(struct ospf *, uint8_t, unsigned short);
extern void ospf_asbr_check(void);