diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-08-30 20:36:05 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-30 20:36:05 +0300 |
| commit | a2488e8b5ed4bd9d9ff1e593db37a44c2ee3bded (patch) | |
| tree | 1b28400421a4b295c5a9a970913ea5e896c87236 /zebra/zebra_vxlan.c | |
| parent | 6a3f0ee28b995e227987ae3102868d9f9b43383a (diff) | |
| parent | 8ca2682ae8c155e18fe95438be8b702c31c1fa5f (diff) | |
Merge pull request #11881 from FRRouting/mergify/bp/stable/8.3/pr-11866
zebra: fix missing vni transition (backport #11866)
Diffstat (limited to 'zebra/zebra_vxlan.c')
| -rw-r--r-- | zebra/zebra_vxlan.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 4d8cfd3e0c..22edba9817 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -2090,6 +2090,7 @@ static int zebra_vxlan_handle_vni_transition(struct zebra_vrf *zvrf, vni_t vni, int add) { struct zebra_evpn *zevpn = NULL; + struct zebra_l3vni *zl3vni = NULL; /* There is a possibility that VNI notification was already received * from kernel and we programmed it as L2-VNI @@ -2117,6 +2118,10 @@ static int zebra_vxlan_handle_vni_transition(struct zebra_vrf *zvrf, vni_t vni, /* Free up all remote VTEPs, if any. */ zebra_evpn_vtep_del_all(zevpn, 1); + zl3vni = zl3vni_from_vrf(zevpn->vrf_id); + if (zl3vni) + listnode_delete(zl3vni->l2vnis, zevpn); + /* Delete the hash entry. */ if (zebra_evpn_vxlan_del(zevpn)) { flog_err(EC_ZEBRA_VNI_DEL_FAILED, @@ -2172,8 +2177,12 @@ static int zebra_vxlan_handle_vni_transition(struct zebra_vrf *zvrf, vni_t vni, /* Find bridge interface for the VNI */ vlan_if = zvni_map_to_svi(vxl->access_vlan, zif->brslave_info.br_if); - if (vlan_if) + if (vlan_if) { zevpn->vrf_id = vlan_if->vrf->vrf_id; + zl3vni = zl3vni_from_vrf(vlan_if->vrf->vrf_id); + if (zl3vni) + listnode_add_sort_nodup(zl3vni->l2vnis, zevpn); + } zevpn->vxlan_if = ifp; zevpn->local_vtep_ip = vxl->vtep_ip; |
