]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospf6d: Fix flooding of old copies of self-originated LSAs 7243/head
authorMartin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
Tue, 29 Sep 2020 21:07:40 +0000 (23:07 +0200)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 7 Oct 2020 08:01:16 +0000 (11:01 +0300)
When receiving old copies (e.g. originated before the local ospf6d was
restarted) of supposedly self-originated LSAs which we previously tried to
flush from the network (by setting them to MaxAge), neither flood them nor
add them to our LSDB. Instead, keep the MaxAge version until we actually
(re-)originate them.

Possible fix for #7030. Testcase in #7168
(tests/topotests/ospf6-dr-no-netlsa-bug7030).

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
ospf6d/ospf6_flood.c

index b144c6804e9e41bdffc5c3a9e85ba46af9547bcd..56aac0f21fa4a57f0a5a722d64cabe11a3879f3f 100644 (file)
@@ -1001,18 +1001,22 @@ void ospf6_receive_lsa(struct ospf6_neighbor *from,
                         * MAXAGEd and not removed.*/
                        if (OSPF6_LSA_IS_MAXAGE(old)
                            && !OSPF6_LSA_IS_MAXAGE(new)) {
-
-                               if (is_debug)
-                                       zlog_debug(
-                                               "%s: Current copy of LSA %s is MAXAGE, but new has recent Age.",
-                                               old->name, __func__);
-
-                               ospf6_lsa_purge(old);
                                if (new->header->adv_router
-                                   != from->ospf6_if->area->ospf6->router_id)
+                                   != from->ospf6_if->area->ospf6->router_id) {
+                                       if (is_debug)
+                                               zlog_debug(
+                                                       "%s: Current copy of LSA %s is MAXAGE, but new has recent age, flooding/installing.",
+                                                       old->name, __PRETTY_FUNCTION__);
+                                       ospf6_lsa_purge(old);
                                        ospf6_flood(from, new);
-
-                               ospf6_install_lsa(new);
+                                       ospf6_install_lsa(new);
+                               } else {
+                                       if (is_debug)
+                                               zlog_debug(
+                                                       "%s: Current copy of self-originated LSA %s is MAXAGE, but new has recent age, ignoring new.",
+                                                       old->name, __PRETTY_FUNCTION__);
+                                       ospf6_lsa_delete(new);
+                               }
                                return;
                        }