diff options
| author | Xiao Liang <shaw.leon@gmail.com> | 2022-12-15 17:04:32 +0800 |
|---|---|---|
| committer | Xiao Liang <shaw.leon@gmail.com> | 2023-07-27 15:07:42 +0800 |
| commit | cea3f7f25a23e485d4f814b670c11c92249568e1 (patch) | |
| tree | d1a44bda931904553f9384f3ebfa063d6766a0b9 /zebra/zapi_msg.c | |
| parent | 49f04841131b917ac6218ecba933af36f51a7f91 (diff) | |
lib, zebra: Fix EVPN nexthop config order
Delay EVPN route addition to synchronize with rib_delete(), which now
uses early route queue.
Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Diffstat (limited to 'zebra/zapi_msg.c')
| -rw-r--r-- | zebra/zapi_msg.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index a136fcf8ae..2fc696c4e1 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -1558,7 +1558,6 @@ static struct nexthop *nexthop_from_zapi(const struct zapi_nexthop *api_nh, uint16_t backup_nexthop_num) { struct nexthop *nexthop = NULL; - struct ipaddr vtep_ip; struct interface *ifp; int i; char nhbuf[INET6_ADDRSTRLEN] = ""; @@ -1594,13 +1593,8 @@ static struct nexthop *nexthop_from_zapi(const struct zapi_nexthop *api_nh, * the nexthop and associated MAC need to be installed. */ 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); + nexthop->rmac = api_nh->rmac; } break; case NEXTHOP_TYPE_IPV6: @@ -1628,13 +1622,8 @@ static struct nexthop *nexthop_from_zapi(const struct zapi_nexthop *api_nh, * the nexthop and associated MAC need to be installed. */ 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); + nexthop->rmac = api_nh->rmac; } break; case NEXTHOP_TYPE_BLACKHOLE: |
