]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: Default route becomes stale route in nbrs even after flush from originator. 10920/head
authorrgirada <rgirada@vmware.com>
Mon, 21 Mar 2022 09:48:46 +0000 (02:48 -0700)
committermergify-bot <noreply@mergify.com>
Tue, 29 Mar 2022 15:02:07 +0000 (15:02 +0000)
Description:
Default route is not getting flushed from neighbours though originator
        triggered flush and deleted LSA from its database. It become as stale
        LSA in  neighbours databse forever. This could seen in the following
        sequence of configurations with less than a second interval b/w configs.
        And this could happen only when originator shouldnt have default route
        in its rib so it originates default route only when configure with 'always'
        option.

        step-1:default-information originate always
        step-2:no default-information originate always
        step-3:default-information originate

        In step-1, default route will be originated to AS.
        In step-2, default route will be flushed to AS, but neighbours will be
                   discarding this update due to minlsainterval condition.
                   And it is expected that DUT need to keep send this update
                   until it receives the ack from neighbours by adding each
                   neighbour's retransmission list.
        In Step-3: It is deleting the lsas from nbr's retransmission list
                   by assuming it initiated the flush. This is cuasing to not
                   send the lsa update anymore to neighbours which makes
                   stale lsa in nbrs forever.

Fix:
        Allowed to delete the lsa from retransmission list only when lsa is
        not in maxage during flushing procedure.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
(cherry picked from commit ab31275cf6243ae713e8e94df28fc2b8d887798e)

ospfd/ospf_lsa.c

index 8d5557a10dfcf5dc20aea4c6779d437c7ba2cf68..b119db7b21025539268246e417f2e0336fe3db85 100644 (file)
@@ -2253,10 +2253,10 @@ void ospf_external_lsa_flush(struct ospf *ospf, uint8_t type,
            && !(CHECK_FLAG(lsa->flags, OSPF_LSA_LOCAL_XLT)))
                ospf_nssa_lsa_flush(ospf, p);
 
-       /* Sweep LSA from Link State Retransmit List. */
-       ospf_ls_retransmit_delete_nbr_as(ospf, lsa);
-
        if (!IS_LSA_MAXAGE(lsa)) {
+               /* Sweep LSA from Link State Retransmit List. */
+               ospf_ls_retransmit_delete_nbr_as(ospf, lsa);
+
                /* Unregister LSA from Refresh queue. */
                ospf_refresher_unregister_lsa(ospf, lsa);