]> git.puffer.fish Git - mirror/frr.git/commitdiff
Revert "ospfd: remove default origin max age lsa"
authorDavid Lamparter <equinox@diac24.net>
Mon, 29 Jul 2019 10:32:32 +0000 (12:32 +0200)
committerDavid Lamparter <equinox@diac24.net>
Fri, 2 Aug 2019 09:29:03 +0000 (11:29 +0200)
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>
ospfd/ospf_lsa.c
ospfd/ospf_lsa.h
ospfd/ospf_zebra.c

index c5e2c44275761f28439a1f93a4ee647cd01e9628..7aa4a48d81858adb3f64a7de974fd74bf0d064f4 100644 (file)
@@ -2220,22 +2220,6 @@ void ospf_external_lsa_refresh_default(struct ospf *ospf)
        }
 }
 
-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)
 {
index 4551b83d755da359b433f11d7d4049e0e1585a7f..4033659bffbe8ae2095400db45642a265a35dc0b 100644 (file)
@@ -300,7 +300,6 @@ extern int ospf_lsa_maxage_walker(struct thread *);
 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);
index c72e5c2d3735e9de3ceb40ecd8cb8cdd47d432be..714b3bb8178ca98d622f1c1b957add2480035bf7 100644 (file)
@@ -856,9 +856,6 @@ int ospf_redistribute_default_unset(struct ospf *ospf)
 
        ospf_asbr_status_update(ospf, --ospf->redistribute);
 
-       /* clean up maxage default originate external lsa */
-       ospf_default_originate_lsa_update(ospf);
-
        return CMD_SUCCESS;
 }