From 3fa177eed287823bbe1d6c7bd9856d1d19435db3 Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah Date: Fri, 29 May 2020 09:53:31 -0700 Subject: [PATCH] zebra: relax if_type check to allow early ES config creation 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 --- zebra/zebra_evpn_mh.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c index 98120accfd..01ea9c5b9c 100644 --- a/zebra/zebra_evpn_mh.c +++ b/zebra/zebra_evpn_mh.c @@ -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; }