struct zebra_vrf *zvrf = NULL;
char buf[ETHER_ADDR_STRLEN];
- zvrf = zvrf_info_lookup(zvni->vxlan_if->vrf);
+ zvrf = vrf_info_lookup(zvni->vxlan_if->vrf_id);
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug("Processing neighbors on local MAC %s %s, VNI %u",
struct interface *tmp_if = NULL;
struct zebra_if *zif = NULL;
- zvrf = zvrf_info_lookup(ifp->vrf);
+ zvrf = vrf_info_lookup(ifp->vrf_id);
assert(zvrf);
FOR_ALL_INTERFACES (zvrf->vrf, tmp_if) {
apply_mask(&p);
if (advertise)
- ip_prefix_send_to_client(vrf_to_id(ifp->vrf), &p,
+ ip_prefix_send_to_client(ifp->vrf_id, &p,
ZEBRA_IP_PREFIX_ROUTE_ADD);
else
- ip_prefix_send_to_client(vrf_to_id(ifp->vrf), &p,
+ ip_prefix_send_to_client(ifp->vrf_id, &p,
ZEBRA_IP_PREFIX_ROUTE_DEL);
}
return 0;
if (IS_ZEBRA_DEBUG_VXLAN)
zlog_debug(
"%u:SVI %s(%u) VNI %u, sending GW MAC %s IP %s del to BGP",
- vrf_to_id(ifp->vrf), ifp->name, ifp->ifindex, zvni->vni,
+ ifp->vrf_id, ifp->name, ifp->ifindex, zvni->vni,
prefix_mac2str(&(n->emac), buf1, sizeof(buf1)),
ipaddr2str(ip, buf2, sizeof(buf2)));
}
}
- zvrf = zvrf_info_lookup(zvni->vxlan_if->vrf);
+ zvrf = vrf_info_lookup(zvni->vxlan_if->vrf_id);
if (!zvrf) {
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("\tUnable to find vrf for: %s",
- zvni->vxlan_if->vrf->name);
+ zlog_debug("\tUnable to find vrf for: %d",
+ zvni->vxlan_if->vrf_id);
return -1;
}
vlan_if = zvni_map_to_svi(vxl->access_vlan,
zif->brslave_info.br_if);
if (vlan_if) {
- zvni->vrf_id = vrf_to_id(vlan_if->vrf);
- zl3vni = zl3vni_from_vrf(
- vrf_to_id(vlan_if->vrf));
+ zvni->vrf_id = vlan_if->vrf_id;
+ zl3vni = zl3vni_from_vrf(vlan_if->vrf_id);
if (zl3vni)
listnode_add_sort(zl3vni->l2vnis, zvni);
}
return;
}
- zvrf = zvrf_info_lookup(zvni->vxlan_if->vrf);
+ zvrf = vrf_info_lookup(zvni->vxlan_if->vrf_id);
if (!zvrf)
return;
if (!mac && !n)
return;
- zvrf = zvrf_info_lookup(zvni->vxlan_if->vrf);
+ zvrf = vrf_info_lookup(zvni->vxlan_if->vrf_id);
/* Ignore the delete if this mac is a gateway mac-ip */
if (CHECK_FLAG(mac->flags, ZEBRA_MAC_LOCAL)
return 0;
}
- zvrf = zvrf_info_lookup(zvni->vxlan_if->vrf);
+ zvrf = vrf_info_lookup(zvni->vxlan_if->vrf_id);
if (!zvrf) {
zlog_debug("%s: VNI %u vrf lookup failed.",
__PRETTY_FUNCTION__, zvni->vni);
return -1;
}
- zvrf = zvrf_info_lookup(zvni->vxlan_if->vrf);
+ zvrf = vrf_info_lookup(zvni->vxlan_if->vrf_id);
if (!zvrf) {
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_debug("\tNo Vrf found for vrf_id: %s",
- zvni->vxlan_if->vrf->name);
+ zlog_debug("\tNo Vrf found for vrf_id: %d",
+ zvni->vxlan_if->vrf_id);
return -1;
}
zlog_debug(
"SVI %s(%u) VNI %u VRF %s is UP, installing neighbors",
ifp->name, ifp->ifindex, zvni->vni,
- vrf_to_name(ifp->vrf));
+ vrf_id_to_name(ifp->vrf_id));
/* update the vrf information for l2-vni and inform bgp */
- zvni->vrf_id = vrf_to_id(ifp->vrf);
+ zvni->vrf_id = ifp->vrf_id;
zvni_send_add_to_client(zvni);
/* Install any remote neighbors for this VNI. */
vlan_if = zvni_map_to_svi(vxl->access_vlan,
zif->brslave_info.br_if);
if (vlan_if) {
- zvni->vrf_id = vrf_to_id(vlan_if->vrf);
- zl3vni = zl3vni_from_vrf(vrf_to_id(vlan_if->vrf));
+ zvni->vrf_id = vlan_if->vrf_id;
+ zl3vni = zl3vni_from_vrf(vlan_if->vrf_id);
if (zl3vni)
listnode_add_sort(zl3vni->l2vnis, zvni);
}
vlan_if = zvni_map_to_svi(vxl->access_vlan,
zif->brslave_info.br_if);
if (vlan_if) {
- zvni->vrf_id = vrf_to_id(vlan_if->vrf);
- zl3vni = zl3vni_from_vrf(vrf_to_id(vlan_if->vrf));
+ zvni->vrf_id = vlan_if->vrf_id;
+ zl3vni = zl3vni_from_vrf(vlan_if->vrf_id);
if (zl3vni)
listnode_add_sort(zl3vni->l2vnis, zvni);
}
zlog_debug(
"Add L2-VNI %u VRF %s intf %s(%u) VLAN %u local IP %s mcast_grp %s master %u",
vni,
- vlan_if ? vrf_to_name(vlan_if->vrf)
+ vlan_if ? vrf_id_to_name(vlan_if->vrf_id)
: VRF_DEFAULT_NAME,
ifp->name, ifp->ifindex, vxl->access_vlan,
addr_buf1, addr_buf2,