summaryrefslogtreecommitdiff
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index b3f04e421e..24c01b7f51 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -507,7 +507,7 @@ parse_nexthop_unicast(ns_id_t ns_id, struct rtmsg *rtm, struct rtattr **tb,
if (index) {
ifp = if_lookup_by_index_per_ns(zebra_ns_lookup(ns_id), index);
if (ifp)
- nh_vrf_id = ifp->vrf_id;
+ nh_vrf_id = ifp->vrf->vrf_id;
}
nh.vrf_id = nh_vrf_id;
@@ -581,7 +581,7 @@ static uint8_t parse_multipath_nexthops_unicast(ns_id_t ns_id,
ifp = if_lookup_by_index_per_ns(zebra_ns_lookup(ns_id),
index);
if (ifp)
- nh_vrf_id = ifp->vrf_id;
+ nh_vrf_id = ifp->vrf->vrf_id;
else {
flog_warn(
EC_ZEBRA_UNKNOWN_INTERFACE,
@@ -2799,7 +2799,7 @@ static struct nexthop netlink_nexthop_process_nh(struct rtattr **tb,
if (ifp)
*ifp = ifp_lookup;
if (ifp_lookup)
- nh.vrf_id = ifp_lookup->vrf_id;
+ nh.vrf_id = ifp_lookup->vrf->vrf_id;
else {
flog_warn(
EC_ZEBRA_UNKNOWN_INTERFACE,
@@ -3503,8 +3503,8 @@ static int netlink_request_specific_mac_in_bridge(struct zebra_ns *zns,
zlog_debug(
"%s: Tx family %s IF %s(%u) vrf %s(%u) MAC %pEA vid %u",
__func__, nl_family_to_str(req.ndm.ndm_family),
- br_if->name, br_if->ifindex,
- vrf_id_to_name(br_if->vrf_id), br_if->vrf_id, mac, vid);
+ br_if->name, br_if->ifindex, br_if->vrf->name,
+ br_if->vrf->vrf_id, mac, vid);
return netlink_request(&zns->netlink_cmd, &req);
}
@@ -3676,7 +3676,6 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
struct interface *link_if;
struct ethaddr mac;
struct ipaddr ip;
- struct vrf *vrf;
char buf[ETHER_ADDR_STRLEN];
int mac_present = 0;
bool is_ext;
@@ -3695,7 +3694,6 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
if (!ifp || !ifp->info)
return 0;
- vrf = vrf_lookup_by_id(ifp->vrf_id);
zif = (struct zebra_if *)ifp->info;
/* Parse attributes and extract fields of interest. */
@@ -3705,7 +3703,7 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
zlog_debug("%s family %s IF %s(%u) vrf %s(%u) - no DST",
nl_msg_type_to_str(h->nlmsg_type),
nl_family_to_str(ndm->ndm_family), ifp->name,
- ndm->ndm_ifindex, VRF_LOGNAME(vrf), ifp->vrf_id);
+ ndm->ndm_ifindex, ifp->vrf->name, ifp->vrf->vrf_id);
return 0;
}
@@ -3801,7 +3799,8 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
nl_family_to_str(
ndm->ndm_family),
ifp->name, ndm->ndm_ifindex,
- VRF_LOGNAME(vrf), ifp->vrf_id,
+ ifp->vrf->name,
+ ifp->vrf->vrf_id,
(unsigned long)RTA_PAYLOAD(
tb[NDA_LLADDR]));
return 0;
@@ -3825,8 +3824,8 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
"Rx %s family %s IF %s(%u) vrf %s(%u) IP %pIA MAC %s state 0x%x flags 0x%x ext_flags 0x%x",
nl_msg_type_to_str(h->nlmsg_type),
nl_family_to_str(ndm->ndm_family), ifp->name,
- ndm->ndm_ifindex, VRF_LOGNAME(vrf), ifp->vrf_id,
- &ip,
+ ndm->ndm_ifindex, ifp->vrf->name,
+ ifp->vrf->vrf_id, &ip,
mac_present
? prefix_mac2str(&mac, buf, sizeof(buf))
: "",
@@ -3861,7 +3860,7 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
zlog_debug("Rx %s family %s IF %s(%u) vrf %s(%u) IP %pIA",
nl_msg_type_to_str(h->nlmsg_type),
nl_family_to_str(ndm->ndm_family), ifp->name,
- ndm->ndm_ifindex, VRF_LOGNAME(vrf), ifp->vrf_id,
+ ndm->ndm_ifindex, ifp->vrf->name, ifp->vrf->vrf_id,
&ip);
/* Process the delete - it may result in re-adding the neighbor if it is
@@ -4004,7 +4003,7 @@ int netlink_neigh_read_specific_ip(const struct ipaddr *ip,
{
int ret = 0;
struct zebra_ns *zns;
- struct zebra_vrf *zvrf = zebra_vrf_lookup_by_id(vlan_if->vrf_id);
+ struct zebra_vrf *zvrf = vlan_if->vrf->info;
struct zebra_dplane_info dp_info;
zns = zvrf->zns;
@@ -4014,7 +4013,7 @@ int netlink_neigh_read_specific_ip(const struct ipaddr *ip,
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug("%s: neigh request IF %s(%u) IP %pIA vrf %s(%u)",
__func__, vlan_if->name, vlan_if->ifindex, ip,
- vrf_id_to_name(vlan_if->vrf_id), vlan_if->vrf_id);
+ vlan_if->vrf->name, vlan_if->vrf->vrf_id);
ret = netlink_request_specific_neigh_in_vlan(zns, RTM_GETNEIGH, ip,
vlan_if->ifindex);