]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_msdp.c
Merge pull request #5498 from mjstapp/sharp_with_labels
[mirror_frr.git] / pimd / pim_msdp.c
index 74a3a9836bc6b7436320775f3cdc2c61ffef8f93..8a18594fd72969fa968a332edff8f685f406326e 100644 (file)
@@ -126,7 +126,12 @@ static void pim_msdp_sa_upstream_del(struct pim_msdp_sa *sa)
        if (PIM_UPSTREAM_FLAG_TEST_SRC_MSDP(up->flags)) {
                PIM_UPSTREAM_FLAG_UNSET_SRC_MSDP(up->flags);
                sa->flags |= PIM_MSDP_SAF_UP_DEL_IN_PROG;
-               pim_upstream_del(sa->pim, up, __PRETTY_FUNCTION__);
+               up = pim_upstream_del(sa->pim, up, __PRETTY_FUNCTION__);
+               /* re-eval joinDesired; clearing peer-msdp-sa flag can
+                * cause JD to change
+                */
+               if (up)
+                       pim_upstream_update_join_desired(sa->pim, up);
                sa->flags &= ~PIM_MSDP_SAF_UP_DEL_IN_PROG;
        }
 
@@ -445,10 +450,9 @@ static bool pim_msdp_sa_local_add_ok(struct pim_upstream *up)
                return false;
        }
 
-       if (!up->t_ka_timer) {
+       if (!pim_upstream_is_kat_running(up))
                /* stream is not active */
                return false;
-       }
 
        if (!I_am_RP(pim, up->sg.grp)) {
                /* we are not RP for the group */