summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/nexthop.h1
-rw-r--r--zebra/zebra_rib.c4
-rw-r--r--zebra/zserv.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/lib/nexthop.h b/lib/nexthop.h
index 20b0cd5227..a727f37057 100644
--- a/lib/nexthop.h
+++ b/lib/nexthop.h
@@ -80,6 +80,7 @@ struct nexthop {
#define NEXTHOP_FLAG_MATCHED (1 << 4) /* Already matched vs a nexthop */
#define NEXTHOP_FLAG_FILTERED (1 << 5) /* rmap filtered, used by static only */
#define NEXTHOP_FLAG_DUPLICATE (1 << 6) /* nexthop duplicates another active one */
+#define NEXTHOP_FLAG_EVPN_RVTEP (1 << 7) /* EVPN remote vtep nexthop */
#define NEXTHOP_IS_ACTIVE(flags) \
(CHECK_FLAG(flags, NEXTHOP_FLAG_ACTIVE) \
&& !CHECK_FLAG(flags, NEXTHOP_FLAG_DUPLICATE))
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 82f087cebf..ed1a4953bf 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -847,7 +847,9 @@ static unsigned nexthop_active_check(struct route_node *rn,
case NEXTHOP_TYPE_IPV4:
case NEXTHOP_TYPE_IPV4_IFINDEX:
family = AFI_IP;
- if (nexthop_active(AFI_IP, re, nexthop, set, rn))
+ if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_EVPN_RVTEP))
+ SET_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE);
+ else if (nexthop_active(AFI_IP, re, nexthop, set, rn))
SET_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE);
else
UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE);
diff --git a/zebra/zserv.c b/zebra/zserv.c
index fb0412c0a3..db09941944 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -1183,6 +1183,8 @@ static int zread_route_add(struct zserv *client, u_short length,
program the nh as neigh */
if (CHECK_FLAG(api.flags,
ZEBRA_FLAG_EVPN_TYPE2_ROUTE)) {
+ SET_FLAG(nexthop->flags,
+ NEXTHOP_FLAG_EVPN_RVTEP);
vtep_ip.ipa_type = IPADDR_V4;
memcpy(&(vtep_ip.ipaddr_v4),
&(api_nh->gate.ipv4),