This reverts commit
313919d6e3db67eedef77960ea4e2ba2a6018ee1.
This is not the correct way to fix this.
- touching the LSDB to explicitly remove a MaxAge LSA is always wrong
and results in desynchronization of the entire routing domain
- the LSDB code correctly handles replacing a MaxAge LSA with a newly
issued one
- removing the old LSA resets the sequence numbers, which may cause
other routers to reject the new LSA as old
- the function was horribly misnamed
Signed-off-by: David Lamparter <equinox@diac24.net>
}
}
-void ospf_default_originate_lsa_update(struct ospf *ospf)
-{
- struct prefix_ipv4 p;
- struct ospf_lsa *lsa;
-
- p.family = AF_INET;
- p.prefixlen = 0;
- p.prefix.s_addr = 0;
-
- lsa = ospf_external_info_find_lsa(ospf, &p);
- if (lsa && IS_LSA_MAXAGE(lsa)) {
- ospf_discard_from_db(ospf, lsa->lsdb, lsa);
- ospf_lsdb_delete(lsa->lsdb, lsa);
- }
-}
-
void ospf_external_lsa_refresh_type(struct ospf *ospf, uint8_t type,
unsigned short instance, int force)
{
extern struct ospf_lsa *ospf_lsa_refresh(struct ospf *, struct ospf_lsa *);
extern void ospf_external_lsa_refresh_default(struct ospf *);
-extern void ospf_default_originate_lsa_update(struct ospf *ospf);
extern void ospf_external_lsa_refresh_type(struct ospf *, uint8_t,
unsigned short, int);
ospf_asbr_status_update(ospf, --ospf->redistribute);
- /* clean up maxage default originate external lsa */
- ospf_default_originate_lsa_update(ospf);
-
return CMD_SUCCESS;
}