]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: relax if_type check to allow early ES config creation 12303/head
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Fri, 29 May 2020 16:53:31 +0000 (09:53 -0700)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 10 Nov 2022 17:43:23 +0000 (12:43 -0500)
The API for configuring ES in zebra had a strict check for if_type
"isBond" that prevented the ES config from being created before the
interface.

Ticket: CM-29454

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

index 98120accfdc2e5fa7c22afa071aae4725a9cea2e..01ea9c5b9c924d4af15dba0bd64f9247ad3cf2e6 100644 (file)
@@ -2759,6 +2759,12 @@ bool zebra_evpn_is_if_es_capable(struct zebra_if *zif)
        if (zif->zif_type == ZEBRA_IF_BOND)
                return true;
 
+       /* relax the checks to allow config to be applied in zebra
+        * before interface is rxed from the kernel
+        */
+       if (zif->ifp->ifindex == IFINDEX_INTERNAL)
+               return true;
+
        /* XXX: allow swpX i.e. a regular ethernet port to be an ES link too */
        return false;
 }