]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: run DF election only on (*, G) termination mroutes
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Wed, 10 Jul 2019 15:00:04 +0000 (08:00 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 6 Mar 2020 21:03:28 +0000 (16:03 -0500)
(S,G) entries that inherit ipmr-lo into the OIL also inherit
the DF role from the parent (*, G) entry.

This change is done primarily to simplify the sync process and
to prevent the MLAG peers from having to track (S, G) activity etc.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
pimd/pim_upstream.c

index cf333ffccf152f06de4d816c92895676710ed266..c905dd146aeb8555321a081d82b2cf99d09ff391 100644 (file)
@@ -853,9 +853,23 @@ static struct pim_upstream *pim_upstream_new(struct pim_instance *pim,
        up->ifchannels = list_new();
        up->ifchannels->cmp = (int (*)(void *, void *))pim_ifchannel_compare;
 
-       if (up->sg.src.s_addr != INADDR_ANY)
+       if (up->sg.src.s_addr != INADDR_ANY) {
                wheel_add_item(pim->upstream_sg_wheel, up);
 
+               /* Inherit the DF role from the parent (*, G) entry for
+                * VxLAN BUM groups
+                */
+               if (up->parent
+                   && PIM_UPSTREAM_FLAG_TEST_MLAG_VXLAN(up->parent->flags)
+                   && PIM_UPSTREAM_FLAG_TEST_MLAG_NON_DF(up->parent->flags)) {
+                       PIM_UPSTREAM_FLAG_SET_MLAG_NON_DF(up->flags);
+                       if (PIM_DEBUG_VXLAN)
+                               zlog_debug(
+                                       "upstream %s inherited mlag non-df flag from parent",
+                                       up->sg_str);
+               }
+       }
+
        if (PIM_UPSTREAM_FLAG_TEST_STATIC_IIF(up->flags)
            || PIM_UPSTREAM_FLAG_TEST_SRC_NOCACHE(up->flags)) {
                pim_upstream_fill_static_iif(up, incoming);
@@ -885,19 +899,6 @@ static struct pim_upstream *pim_upstream_new(struct pim_instance *pim,
                }
        }
 
-       /* If (S, G) inherit the MLAG_VXLAN from the parent
-        * (*, G) entry.
-        */
-       if ((up->sg.src.s_addr != INADDR_ANY) &&
-               up->parent &&
-               PIM_UPSTREAM_FLAG_TEST_MLAG_VXLAN(up->parent->flags) &&
-               !PIM_UPSTREAM_FLAG_TEST_SRC_VXLAN_ORIG(up->flags)) {
-               PIM_UPSTREAM_FLAG_SET_MLAG_VXLAN(up->flags);
-               if (PIM_DEBUG_VXLAN)
-                       zlog_debug("upstream %s inherited mlag vxlan flag from parent",
-                                       up->sg_str);
-       }
-
        /* send the entry to the MLAG peer */
        /* XXX - duplicate send is possible here if pim_rpf_update
         * successfully resolved the nexthop