Commit f42c44e0b9 for frr

commit f42c44e0b9dd6e2d7a0b8212e42bc8b1fd88cdb2
Author: Nageswara Soma <nsoma@cisco.com>
Date:   Sun Nov 15 18:12:11 2026 -0800

    ospf6d: stop older LSAs replacing MaxAge copies

    A delayed non-MaxAge LSA can resurrect a withdrawn
    route while its newer MaxAge instance is still in
    the database. Routers then disagree about the LSA
    and keep an unreachable route installed.

    ospf6_receive_lsa() correctly identifies the received
    LSA as older, but a restart workaround then purges
    the newer MaxAge copy and floods and installs the
    stale instance for a remote advertiser.

    Remove that override, added by 76249532fa in 2018.
    Keep the newer database copy and return it to the
    neighbor using the existing RFC 2328 section 13(8)
    handling. With equal sequence and checksum, MaxAge
    wins under section 13.1; RFC 5340 retains this rule.

    Normal restart recovery uses section 13.4: peers
    return the retained newer LSA to its originator,
    which advances past that sequence and originates
    a new instance. Accepting an older LSA is unnecessary.

    Signed-off-by: Nageswara Soma <nsoma@cisco.com>

diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c
index 51305277b7..fd0e738f2c 100644
--- a/ospf6d/ospf6_flood.c
+++ b/ospf6d/ospf6_flood.c
@@ -1219,35 +1219,10 @@ void ospf6_receive_lsa(struct ospf6_neighbor *from,
 					"Send back directly and then discard");
 			}

-			/* Neighbor router sent recent age for LSA,
-			 * Router could be restarted while current copy is
-			 * MAXAGEd and not removed.*/
-			if (OSPF6_LSA_IS_MAXAGE(old)
-			    && !OSPF6_LSA_IS_MAXAGE(new)) {
-				if (new->header->adv_router
-				    != 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.",
-							__PRETTY_FUNCTION__, old->name);
-					/* The MaxAge instance is already flooded. Clear
-					 * its retransmission entry so the revived
-					 * instance can be flooded in its place.
-					 */
-					ospf6_flood_clear(old);
-					ospf6_flood(from, new);
-					ospf6_install_lsa(new);
-					return;
-				}
-				/* For self-originated LSA, only trust
-				 * ourselves. Fall through and send
-				 * LS Update with our current copy.
-				 */
-				if (is_debug)
-					zlog_debug(
-						"%s: Current copy of self-originated LSA %s is MAXAGE, but new has recent age, re-sending current one.",
-						__PRETTY_FUNCTION__, old->name);
-			}
+			/* RFC 2328 section 13 (8): retain the newer database
+			 * copy, including MaxAge withdrawals, and send it back.
+			 * A stale non-MaxAge LSA must not resurrect the route.
+			 */

 			/* MinLSArrival check as per RFC 2328 13 (8) */
 			if (ospf6_lsa_check_min_arrival(old, from)) {