]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_evpn_mh.h
zebra: use ifindex vs ifp to avoid use-after-free on shutdown
[mirror_frr.git] / zebra / zebra_evpn_mh.h
index 12a8569504a28a5c8571b1b7e7aef520f49e8d73..59a41d06069984f11078cc3d41d0b632a1781c1f 100644 (file)
@@ -1,20 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Zebra EVPN MH Data structures and definitions
  *
  * Copyright (C) 2019 Cumulus Networks, Inc.
  * Anuradha Karuppiah
- *
- * 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.
  */
 
 #ifndef _ZEBRA_EVPN_MH_H
@@ -98,7 +87,7 @@ struct zebra_evpn_es {
         * imported before running the DF election.
         */
 #define ZEBRA_EVPN_MH_DF_DELAY_TIME 3 /* seconds */
-       struct thread *df_delay_timer;
+       struct event *df_delay_timer;
 };
 RB_HEAD(zebra_es_rb_head, zebra_evpn_es);
 RB_PROTOTYPE(zebra_es_rb_head, zebra_evpn_es, rb_node, zebra_es_rb_cmp);
@@ -259,7 +248,7 @@ struct zebra_evpn_mh_info {
         */
        int startup_delay_time; /* seconds */
 #define ZEBRA_EVPN_MH_STARTUP_DELAY_DEF (3 * 60)
-       struct thread *startup_delay_timer;
+       struct event *startup_delay_timer;
 
        /* Number of configured uplinks */
        uint32_t uplink_cfg_cnt;
@@ -355,6 +344,8 @@ extern void zebra_evpn_if_es_print(struct vty *vty, json_object *json,
                                   struct zebra_if *zif);
 extern struct zebra_evpn_access_bd *
 zebra_evpn_acc_vl_find(vlanid_t vid, struct interface *br_if);
+struct zebra_evpn_access_bd *
+zebra_evpn_acc_vl_find_index(vlanid_t vid, ifindex_t bridge_ifindex);
 extern void zebra_evpn_acc_vl_show_vid(struct vty *vty, bool uj, vlanid_t vid,
                                       struct interface *br_if);
 extern void zebra_evpn_es_cleanup(void);