mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-14 12:52:37 +00:00
bgpd: set evpn rvtep nexthops as active by default
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
This commit is contained in:
parent
5ba238b74a
commit
19a847a9cd
@ -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))
|
||||
|
@ -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);
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user