struct zebra_l2info_vxlan zl2_info;
struct interface *vlan_if = NULL;
struct interface *vrr_if = NULL;
+ struct interface *ifp;
/* Add primary SVI MAC*/
zvni = (zebra_vni_t *)backet->data;
if (!zvni)
return;
- zif = zvni->vxlan_if->info;
+ ifp = zvni->vxlan_if;
+ if (!ifp)
+ return;
+ zif = ifp->info;
+
+ /* If down or not mapped to a bridge, we're done. */
+ if (!if_is_operative (ifp) || !zif->brslave_info.br_if)
+ return;
+
zl2_info = zif->l2info.vxl;
vlan_if = zvni_map_to_svi(zvrf, zl2_info.access_vlan,
struct zebra_l2info_vxlan zl2_info;
struct interface *vlan_if = NULL;
struct interface *vrr_if = NULL;
+ struct interface *ifp = NULL;
zvni = (zebra_vni_t *)backet->data;
if (!zvni)
if (!advertise_gw_macip_enabled(zvrf, zvni))
return;
- zif = zvni->vxlan_if->info;
+ ifp = zvni->vxlan_if;
+ if (!ifp)
+ return;
+ zif = ifp->info;
+
+ /* If down or not mapped to a bridge, we're done. */
+ if (!if_is_operative (ifp) || !zif->brslave_info.br_if)
+ return;
zl2_info = zif->l2info.vxl;
vlan_if = zvni_map_to_svi(zvrf, zl2_info.access_vlan,
struct zebra_l2info_vlan *vl;
u_char bridge_vlan_aware;
+ /* Defensive check, caller expected to invoke only with valid bridge. */
+ if (!br_if)
+ return NULL;
+
/* Determine if bridge is VLAN-aware or not */
zif = br_if->info;
assert(zif);
u_short l = 0, ipa_len;
char buf[ETHER_ADDR_STRLEN];
char buf1[INET6_ADDRSTRLEN];
+ struct interface *ifp = NULL;
+ struct zebra_if *zif = NULL;
s = client->ibuf;
zvrf_id(zvrf), vni);
continue;
}
- if (!zvni->vxlan_if) {
+ ifp = zvni->vxlan_if;
+ if (!ifp)
zlog_err(
"VNI %u hash %p doesn't have intf upon remote MACIP DEL",
vni, zvni);
continue;
}
+ zif = ifp->info;
+
+ /* If down or not mapped to a bridge, we're done. */
+ if (!if_is_operative (ifp) || !zif->brslave_info.br_if)
+ continue;
/* The remote VTEP specified is normally expected to exist, but
* it is
if (!zvni_vtep_find(zvni, &vtep_ip))
continue;
- /* If the local VxLAN interface is not up (should be a transient
- * event), there's nothing more to do.
- */
- if (!if_is_operative(zvni->vxlan_if))
- continue;
-
mac = zvni_mac_lookup(zvni, &macaddr);
if (ipa_len)
n = zvni_neigh_lookup(zvni, &ip);
char buf[ETHER_ADDR_STRLEN];
char buf1[INET6_ADDRSTRLEN];
u_char sticky;
+ struct interface *ifp = NULL;
+ struct zebra_if *zif = NULL;
assert(EVPN_ENABLED(zvrf));
zvrf_id(zvrf), vni);
continue;
}
- if (!zvni->vxlan_if) {
+ ifp = zvni->vxlan_if;
+ if (!ifp) {
zlog_err(
"VNI %u hash %p doesn't have intf upon remote MACIP add",
vni, zvni);
continue;
}
- /* If the local VxLAN interface is not up (should be a transient
- * event), there's nothing more to do.
- */
- if (!if_is_operative(zvni->vxlan_if))
+ zif = ifp->info;
+
+ /* If down or not mapped to a bridge, we're done. */
+ if (!if_is_operative (ifp) || !zif->brslave_info.br_if)
continue;
/* The remote VTEP specified should normally exist, but it is
struct in_addr vtep_ip;
zebra_vni_t *zvni;
zebra_vtep_t *zvtep;
+ struct interface *ifp;
+ struct zebra_if *zif;
s = client->ibuf;
continue;
}
+ ifp = zvni->vxlan_if;
+ if (!ifp) {
+ zlog_err ("VNI %u hash %p doesn't have intf upon remote VTEP DEL",
+ zvni->vni, zvni);
+ continue;
+ }
+ zif = ifp->info;
+
+ /* If down or not mapped to a bridge, we're done. */
+ if (!if_is_operative (ifp) || !zif->brslave_info.br_if)
+ continue;
+
/* If the remote VTEP does not exist, there's nothing more to
* do.
* Otherwise, uninstall any remote MACs pointing to this VTEP
vni_t vni;
struct in_addr vtep_ip;
zebra_vni_t *zvni;
+ struct interface *ifp;
+ struct zebra_if *zif;
assert(EVPN_ENABLED(zvrf));
zvrf_id(zvrf), vni);
continue;
}
- if (!zvni->vxlan_if) {
+
+ ifp = zvni->vxlan_if;
+ if (!ifp) {
zlog_err(
"VNI %u hash %p doesn't have intf upon remote VTEP ADD",
zvni->vni, zvni);
continue;
}
+ zif = ifp->info;
- /* If the remote VTEP already exists, or the local VxLAN
- * interface is
- * not up (should be a transient event), there's nothing more
- * to do.
- * Otherwise, add and install the entry.
- */
- if (zvni_vtep_find(zvni, &vtep_ip))
+ /* If down or not mapped to a bridge, we're done. */
+ if (!if_is_operative (ifp) || !zif->brslave_info.br_if)
continue;
- if (!if_is_operative(zvni->vxlan_if))
+ /* If the remote VTEP already exists, there's nothing more to do. */
+ if (zvni_vtep_find(zvni, &vtep_ip))
continue;
if (zvni_vtep_add(zvni, &vtep_ip) == NULL) {
int advertise;
vni_t vni = 0;
zebra_vni_t *zvni = NULL;
+ struct interface *ifp = NULL;
s = client->ibuf;
advertise = stream_getc(s);
zvni->advertise_gw_macip = advertise;
- zif = zvni->vxlan_if->info;
+ ifp = zvni->vxlan_if;
+ if (!ifp)
+ return 0;
+
+ zif = ifp->info;
+
+ /* If down or not mapped to a bridge, we're done. */
+ if (!if_is_operative (ifp) || !zif->brslave_info.br_if)
+ return 0;
+
zl2_info = zif->l2info.vxl;
vlan_if = zvni_map_to_svi(zvrf, zl2_info.access_vlan,