]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_vxlan.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / zebra / zebra_vxlan.c
index 7e151e01c80b71e4a072225feaacc6b3d5b44d75..19f1839ac7c4052791400046c17d05b2310b6352 100644 (file)
@@ -1,23 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Zebra EVPN for VxLAN code
  * Copyright (C) 2016, 2017 Cumulus Networks, Inc.
- *
- * This file is part of FRR.
- *
- * FRR is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * FRR is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with FRR; see the file COPYING.  If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
  */
 
 #include <zebra.h>
@@ -653,11 +637,6 @@ static void zl3vni_print_nh_all_table(struct hash *nh_table, vni_t vni,
                json_object_object_add(json, vni_str, json_evpn);
 }
 
-static void svd_print_nh_all_table(struct vty *vty, json_object *json)
-{
-       zl3vni_print_nh_all_table(svd_nh_table, 0, vty, json);
-}
-
 static void zl3vni_print_nh_hash_all_vni(struct hash_bucket *bucket,
                                         void **args)
 {
@@ -1055,9 +1034,9 @@ static int zevpn_build_vni_hash_table(struct zebra_if *zif,
                                return 0;
                        }
 
-                       if (zevpn->local_vtep_ip.s_addr != vxl->vtep_ip.s_addr
-                           || zevpn->mcast_grp.s_addr
-                                      != vnip->mcast_grp.s_addr) {
+                       if (zevpn->local_vtep_ip.s_addr !=
+                                   vxl->vtep_ip.s_addr ||
+                           zevpn->mcast_grp.s_addr != vnip->mcast_grp.s_addr) {
                                zebra_vxlan_sg_deref(zevpn->local_vtep_ip,
                                                     zevpn->mcast_grp);
                                zebra_vxlan_sg_ref(vxl->vtep_ip,
@@ -2134,7 +2113,7 @@ static int zl3vni_from_svi_ns(struct ns *ns, void *_in_param, void **_p_zl3vni)
                                continue;
 
                        vni_id = zebra_vxlan_if_access_vlan_vni_find(
-                                       zif, in_param->br_if);
+                               zif, in_param->br_if);
                        if (vni_id) {
                                found = 1;
                                break;
@@ -2836,9 +2815,6 @@ void zebra_vxlan_print_nh_all_l3vni(struct vty *vty, bool use_json)
                               void *))zl3vni_print_nh_hash_all_vni,
                     args);
 
-       /* Global svd table */
-       svd_print_nh_all_table(vty, json);
-
        if (use_json)
                vty_json(vty, json);
 }
@@ -4378,7 +4354,8 @@ int zebra_vxlan_dp_network_mac_add(struct interface *ifp,
        }
 
        /* Get vxlan's vid for netlink message has no it. */
-       vid = ((struct zebra_if *)ifp->info)->l2info.vxl.access_vlan;
+       vid = ((struct zebra_if *)ifp->info)
+                     ->l2info.vxl.vni_info.vni.access_vlan;
 
        /* if remote mac delete the local entry */
        if (!nhg_id || !zebra_evpn_nhg_is_local_es(nhg_id, &es)