]> git.puffer.fish Git - mirror/frr.git/commitdiff
OSPFd: Correct Extended Prefix flooding for SR 6726/head
authorOlivier Dugeon <olivier.dugeon@orange.com>
Thu, 9 Jul 2020 08:51:58 +0000 (10:51 +0200)
committerOlivier Dugeon <olivier.dugeon@orange.com>
Thu, 20 Aug 2020 13:51:48 +0000 (15:51 +0200)
PR #6416 that solves opsf crash when segment routing is restarted, introduce a
regression in Extended Prefix flooding: when segment routing prefix is modified
or removed, new segment routing prefix is no more flooded. This patch correct
this regression.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
ospfd/ospf_ext.c

index 8e4548f74dfbd25113b2977019f9ce2dbddb3a6d..bc952e4ef9951670ab782eeacb416db10ae38b42 100644 (file)
@@ -516,7 +516,6 @@ uint32_t ospf_ext_schedule_prefix_index(struct interface *ifp, uint32_t index,
                set_prefix_sid(exti, SR_ALGORITHM_SPF, index, SID_INDEX, flags);
 
                /* Try to Schedule LSA */
-               // SET_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE);
                if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE)) {
                        if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED))
                                ospf_ext_pref_lsa_schedule(exti,
@@ -529,10 +528,8 @@ uint32_t ospf_ext_schedule_prefix_index(struct interface *ifp, uint32_t index,
                osr_debug("EXT (%s): Remove prefix for interface %s", __func__,
                          ifp->name);
 
-               if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED)) {
+               if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED))
                        ospf_ext_pref_lsa_schedule(exti, FLUSH_THIS_LSA);
-                       exti->flags = EXT_LPFLG_LSA_INACTIVE;
-               }
        }
 
        return SET_OPAQUE_LSID(exti->type, exti->instance);
@@ -1377,10 +1374,6 @@ static int ospf_ext_link_lsa_originate(void *arg)
                    || (!IPV4_ADDR_SAME(&exti->area->area_id, &area->area_id)))
                        continue;
 
-               /* Skip Extended Link which are not Active */
-               if (!CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE))
-                       continue;
-
                /* Check if LSA not already engaged */
                if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED)) {
                        if (CHECK_FLAG(exti->flags,