diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2023-08-11 19:48:37 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-11 19:48:37 -0500 |
| commit | 11d0164a0e4e92ef52e9219cf7d8d3b19331a0d2 (patch) | |
| tree | ccfeb077f4347f7f455270cd9f31a31a71653e54 /zebra/zebra_rib.c | |
| parent | 1539b571496129712ab88d99c7d74ff21520d87e (diff) | |
| parent | 1e4351d3b162832b77cb41840565a85da80dd218 (diff) | |
Merge pull request #14185 from FRRouting/mergify/bp/stable/8.4/pr-12524
lib, zebra: Fix EVPN nexthop config order (backport #12524)
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 171837610a..40397e587a 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -2642,6 +2642,8 @@ static void process_subq_early_route_add(struct zebra_early_route *ere) return; } } else { + struct nexthop *tmp_nh; + /* Lookup nhe from route information */ nhe = zebra_nhg_rib_find_nhe(ere->re_nhe, ere->afi); if (!nhe) { @@ -2659,6 +2661,22 @@ static void process_subq_early_route_add(struct zebra_early_route *ere) early_route_memory_free(ere); return; } + for (ALL_NEXTHOPS(nhe->nhg, tmp_nh)) { + if (CHECK_FLAG(tmp_nh->flags, NEXTHOP_FLAG_EVPN)) { + struct ipaddr vtep_ip = {}; + + if (ere->afi == AFI_IP) { + vtep_ip.ipa_type = IPADDR_V4; + vtep_ip.ipaddr_v4 = tmp_nh->gate.ipv4; + } else { + vtep_ip.ipa_type = IPADDR_V6; + vtep_ip.ipaddr_v6 = tmp_nh->gate.ipv6; + } + zebra_rib_queue_evpn_route_add( + re->vrf_id, &tmp_nh->rmac, &vtep_ip, + &ere->p); + } + } } /* |
