diff options
| author | Xiao Liang <shaw.leon@gmail.com> | 2022-02-22 17:22:45 +0800 |
|---|---|---|
| committer | Xiao Liang <shaw.leon@gmail.com> | 2022-06-10 17:12:48 +0800 |
| commit | 5609e70fb87a3b23b55629a33e5afb298974c142 (patch) | |
| tree | 38ec901a91ed7504a7be9154d804dce195888e34 /zebra/zapi_msg.c | |
| parent | db6d4c8375f32c11336f9542b558640c5c5915f2 (diff) | |
lib, zebra, bgpd: Move route EVPN flag to nexthop
Multipath route may have mixed nexthops of EVPN and IP unicast. Move
EVPN flag to nexthop to support such cases.
Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Diffstat (limited to 'zebra/zapi_msg.c')
| -rw-r--r-- | zebra/zapi_msg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 9a30c2b78f..9895943016 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -1606,13 +1606,14 @@ static struct nexthop *nexthop_from_zapi(const struct zapi_nexthop *api_nh, /* Special handling for IPv4 routes sourced from EVPN: * the nexthop and associated MAC need to be installed. */ - if (CHECK_FLAG(flags, ZEBRA_FLAG_EVPN_ROUTE)) { + if (CHECK_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_EVPN)) { memset(&vtep_ip, 0, sizeof(vtep_ip)); vtep_ip.ipa_type = IPADDR_V4; memcpy(&(vtep_ip.ipaddr_v4), &(api_nh->gate.ipv4), sizeof(struct in_addr)); zebra_rib_queue_evpn_route_add( api_nh->vrf_id, &api_nh->rmac, &vtep_ip, p); + SET_FLAG(nexthop->flags, NEXTHOP_FLAG_EVPN); } break; case NEXTHOP_TYPE_IPV6: @@ -1639,13 +1640,14 @@ static struct nexthop *nexthop_from_zapi(const struct zapi_nexthop *api_nh, /* Special handling for IPv6 routes sourced from EVPN: * the nexthop and associated MAC need to be installed. */ - if (CHECK_FLAG(flags, ZEBRA_FLAG_EVPN_ROUTE)) { + if (CHECK_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_EVPN)) { memset(&vtep_ip, 0, sizeof(vtep_ip)); vtep_ip.ipa_type = IPADDR_V6; memcpy(&vtep_ip.ipaddr_v6, &(api_nh->gate.ipv6), sizeof(struct in6_addr)); zebra_rib_queue_evpn_route_add( api_nh->vrf_id, &api_nh->rmac, &vtep_ip, p); + SET_FLAG(nexthop->flags, NEXTHOP_FLAG_EVPN); } break; case NEXTHOP_TYPE_BLACKHOLE: |
