summaryrefslogtreecommitdiff
path: root/zebra/zapi_msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zapi_msg.c')
-rw-r--r--zebra/zapi_msg.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 2f41f7133d..61200806ba 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -165,7 +165,7 @@ int zsend_interface_add(struct zserv *client, struct interface *ifp)
{
struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
- zclient_create_header(s, ZEBRA_INTERFACE_ADD, vrf_to_id(ifp->vrf));
+ zclient_create_header(s, ZEBRA_INTERFACE_ADD, ifp->vrf_id);
zserv_encode_interface(s, ifp);
client->ifadd_cnt++;
@@ -177,7 +177,7 @@ int zsend_interface_delete(struct zserv *client, struct interface *ifp)
{
struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
- zclient_create_header(s, ZEBRA_INTERFACE_DELETE, vrf_to_id(ifp->vrf));
+ zclient_create_header(s, ZEBRA_INTERFACE_DELETE, ifp->vrf_id);
zserv_encode_interface(s, ifp);
client->ifdel_cnt++;
@@ -217,8 +217,7 @@ int zsend_interface_link_params(struct zserv *client, struct interface *ifp)
return 0;
}
- zclient_create_header(s, ZEBRA_INTERFACE_LINK_PARAMS,
- vrf_to_id(ifp->vrf));
+ zclient_create_header(s, ZEBRA_INTERFACE_LINK_PARAMS, ifp->vrf_id);
/* Add Interface Index */
stream_putl(s, ifp->ifindex);
@@ -280,7 +279,7 @@ int zsend_interface_address(int cmd, struct zserv *client,
struct prefix *p;
struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
- zclient_create_header(s, cmd, vrf_to_id(ifp->vrf));
+ zclient_create_header(s, cmd, ifp->vrf_id);
stream_putl(s, ifp->ifindex);
/* Interface address flag. */
@@ -322,7 +321,7 @@ static int zsend_interface_nbr_address(int cmd, struct zserv *client,
struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
struct prefix *p;
- zclient_create_header(s, cmd, vrf_to_id(ifp->vrf));
+ zclient_create_header(s, cmd, ifp->vrf_id);
stream_putl(s, ifp->ifindex);
/* Prefix information. */
@@ -430,8 +429,7 @@ int zsend_interface_vrf_update(struct zserv *client, struct interface *ifp,
{
struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
- zclient_create_header(s, ZEBRA_INTERFACE_VRF_UPDATE,
- vrf_to_id(ifp->vrf));
+ zclient_create_header(s, ZEBRA_INTERFACE_VRF_UPDATE, ifp->vrf_id);
/* Fill in the name of the interface and its new VRF (id) */
stream_put(s, ifp->name, INTERFACE_NAMSIZ);
@@ -506,7 +504,7 @@ int zsend_interface_update(int cmd, struct zserv *client, struct interface *ifp)
{
struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
- zclient_create_header(s, cmd, vrf_to_id(ifp->vrf));
+ zclient_create_header(s, cmd, ifp->vrf_id);
zserv_encode_interface(s, ifp);
if (cmd == ZEBRA_INTERFACE_UP)
@@ -2209,9 +2207,9 @@ static void zread_vrf_label(ZAPI_HANDLER_ARGS)
STREAM_GETC(s, ltype);
if (zvrf->vrf->vrf_id != VRF_DEFAULT)
- ifp = if_lookup_by_name(zvrf->vrf->name, zvrf->vrf);
+ ifp = if_lookup_by_name(zvrf->vrf->name, zvrf->vrf->vrf_id);
else
- ifp = if_lookup_by_name("lo", vrf_lookup_by_id(VRF_DEFAULT));
+ ifp = if_lookup_by_name("lo", VRF_DEFAULT);
if (!ifp) {
zlog_debug("Unable to find specified Interface for %s",