diff options
Diffstat (limited to 'zebra/zebra_evpn.h')
| -rw-r--r-- | zebra/zebra_evpn.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/zebra/zebra_evpn.h b/zebra/zebra_evpn.h index 2c84d23045..8218b77213 100644 --- a/zebra/zebra_evpn.h +++ b/zebra/zebra_evpn.h @@ -33,6 +33,7 @@ #include "zebra/zebra_l2.h" #include "zebra/interface.h" +#include "zebra/zebra_vxlan.h" #ifdef __cplusplus extern "C" { @@ -83,6 +84,10 @@ struct zebra_evpn { uint32_t flags; #define ZEVPN_READY_FOR_BGP (1 << 0) /* ready to be sent to BGP */ + /* Corresponding Bridge information */ + vlanid_t vid; + struct interface *bridge_if; + /* Flag for advertising gw macip */ uint8_t advertise_gw_macip; @@ -138,7 +143,7 @@ static inline struct interface *zevpn_map_to_svi(struct zebra_evpn *zevpn) { struct interface *ifp; struct zebra_if *zif = NULL; - struct zebra_l2info_vxlan zl2_info; + struct zebra_vxlan_vni *vni; ifp = zevpn->vxlan_if; if (!ifp) @@ -146,12 +151,15 @@ static inline struct interface *zevpn_map_to_svi(struct zebra_evpn *zevpn) zif = ifp->info; if (!zif) return NULL; + vni = zebra_vxlan_if_vni_find(zif, zevpn->vni); + if (!vni) + return NULL; /* If down or not mapped to a bridge, we're done. */ if (!if_is_operative(ifp) || !zif->brslave_info.br_if) return NULL; - zl2_info = zif->l2info.vxl; - return zvni_map_to_svi(zl2_info.access_vlan, zif->brslave_info.br_if); + + return zvni_map_to_svi(vni->access_vlan, zif->brslave_info.br_if); } int advertise_gw_macip_enabled(struct zebra_evpn *zevpn); @@ -181,7 +189,8 @@ struct zebra_evpn *zebra_evpn_from_svi(struct interface *ifp, struct interface *br_if); struct interface *zebra_evpn_map_to_macvlan(struct interface *br_if, struct interface *svi_if); -void zebra_evpn_install_mac_hash(struct hash_bucket *bucket, void *ctxt); +void zebra_evpn_rem_mac_install_all(struct zebra_evpn *zevpn); +void zebra_evpn_rem_mac_uninstall_all(struct zebra_evpn *zevpn); void zebra_evpn_read_mac_neigh(struct zebra_evpn *zevpn, struct interface *ifp); unsigned int zebra_evpn_hash_keymake(const void *p); bool zebra_evpn_hash_cmp(const void *p1, const void *p2); |
