]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_macro.c
Merge pull request #6385 from GalaxyGorilla/bfd_igp_topotest
[mirror_frr.git] / pimd / pim_macro.c
index bdef83925adf6ae0ff33797397209a4b5184af98..c6961d30c21ac9571787e9dd96f8b6fd664b0c9c 100644 (file)
@@ -45,11 +45,9 @@ static int downstream_jpstate_isjoined(const struct pim_ifchannel *ch)
        case PIM_IFJOIN_PRUNE_TMP:
        case PIM_IFJOIN_PRUNE_PENDING_TMP:
                return 0;
-               break;
        case PIM_IFJOIN_JOIN:
        case PIM_IFJOIN_PRUNE_PENDING:
                return 1;
-               break;
        }
        return 0;
 }
@@ -115,8 +113,7 @@ int pim_macro_ch_lost_assert(const struct pim_ifchannel *ch)
 
        ifp = ch->interface;
        if (!ifp) {
-               zlog_warn("%s: (S,G)=%s: null interface", __PRETTY_FUNCTION__,
-                         ch->sg_str);
+               zlog_warn("%s: (S,G)=%s: null interface", __func__, ch->sg_str);
                return 0; /* false */
        }
 
@@ -127,7 +124,7 @@ int pim_macro_ch_lost_assert(const struct pim_ifchannel *ch)
        pim_ifp = ifp->info;
        if (!pim_ifp) {
                zlog_warn("%s: (S,G)=%s: multicast not enabled on interface %s",
-                         __PRETTY_FUNCTION__, ch->sg_str, ifp->name);
+                         __func__, ch->sg_str, ifp->name);
                return 0; /* false */
        }
 
@@ -160,10 +157,11 @@ int pim_macro_ch_lost_assert(const struct pim_ifchannel *ch)
 int pim_macro_chisin_pim_include(const struct pim_ifchannel *ch)
 {
        struct pim_interface *pim_ifp = ch->interface->info;
+       bool mlag_active = false;
 
        if (!pim_ifp) {
                zlog_warn("%s: (S,G)=%s: multicast not enabled on interface %s",
-                         __PRETTY_FUNCTION__, ch->sg_str, ch->interface->name);
+                         __func__, ch->sg_str, ch->interface->name);
                return 0; /* false */
        }
 
@@ -175,9 +173,21 @@ int pim_macro_chisin_pim_include(const struct pim_ifchannel *ch)
        if (ch->ifassert_winner.s_addr == pim_ifp->primary_address.s_addr)
                return 1; /* true */
 
+       /*
+        * When we have a activeactive interface we need to signal
+        * that this interface is interesting to the upstream
+        * decision to JOIN *if* we are syncing over the interface
+        */
+       if (pim_ifp->activeactive) {
+               struct pim_upstream *up = ch->upstream;
+
+               if (PIM_UPSTREAM_FLAG_TEST_MLAG_INTERFACE(up->flags))
+                       mlag_active = true;
+       }
+
        return (
                /* I_am_DR( I ) ? */
-               PIM_I_am_DR(pim_ifp) &&
+               (PIM_I_am_DR(pim_ifp) || mlag_active) &&
                /* lost_assert(S,G,I) == false ? */
                (!pim_macro_ch_lost_assert(ch)));
 }
@@ -223,8 +233,7 @@ int pim_macro_ch_could_assert_eval(const struct pim_ifchannel *ch)
 
        ifp = ch->interface;
        if (!ifp) {
-               zlog_warn("%s: (S,G)=%s: null interface", __PRETTY_FUNCTION__,
-                         ch->sg_str);
+               zlog_warn("%s: (S,G)=%s: null interface", __func__, ch->sg_str);
                return 0; /* false */
        }
 
@@ -381,15 +390,14 @@ int pim_macro_assert_tracking_desired_eval(const struct pim_ifchannel *ch)
 
        ifp = ch->interface;
        if (!ifp) {
-               zlog_warn("%s: (S,G)=%s: null interface", __PRETTY_FUNCTION__,
-                         ch->sg_str);
+               zlog_warn("%s: (S,G)=%s: null interface", __func__, ch->sg_str);
                return 0; /* false */
        }
 
        pim_ifp = ifp->info;
        if (!pim_ifp) {
                zlog_warn("%s: (S,G)=%s: multicast not enabled on interface %s",
-                         __PRETTY_FUNCTION__, ch->sg_str, ch->interface->name);
+                         __func__, ch->sg_str, ch->interface->name);
                return 0; /* false */
        }