summaryrefslogtreecommitdiff
path: root/zebra/zapi_msg.c
diff options
context:
space:
mode:
authorXiao Liang <shaw.leon@gmail.com>2022-12-15 17:04:32 +0800
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2023-08-11 15:39:43 +0000
commit1e4351d3b162832b77cb41840565a85da80dd218 (patch)
treeccfeb077f4347f7f455270cd9f31a31a71653e54 /zebra/zapi_msg.c
parent1539b571496129712ab88d99c7d74ff21520d87e (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> (cherry picked from commit cea3f7f25a23e485d4f814b670c11c92249568e1)
Diffstat (limited to 'zebra/zapi_msg.c')
-rw-r--r--zebra/zapi_msg.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index a32a82d73c..6a39b126a8 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -1577,7 +1577,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] = "";
@@ -1613,13 +1612,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:
@@ -1647,13 +1641,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: