summaryrefslogtreecommitdiff
path: root/zebra/zapi_msg.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-10-22 01:17:40 +0300
committerIgor Ryzhov <iryzhov@nfware.com>2021-11-22 20:47:23 +0300
commit096f7609f9168ad1a2503acad31d3afc8f00f9e5 (patch)
tree7acf9cbf0f944b032da6a796fcf8d7f6a06fe90a /zebra/zapi_msg.c
parentd32c92a4c0fcee71a8a6d02cb9ff84607cfdcc07 (diff)
*: cleanup ifp->vrf_id
Since f60a1188 we store a pointer to the VRF in the interface structure. There's no need anymore to store a separate vrf_id field. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'zebra/zapi_msg.c')
-rw-r--r--zebra/zapi_msg.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 54ab0afd5c..421438a051 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -185,7 +185,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, ifp->vrf_id);
+ zclient_create_header(s, ZEBRA_INTERFACE_ADD, ifp->vrf->vrf_id);
zserv_encode_interface(s, ifp);
client->ifadd_cnt++;
@@ -197,7 +197,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, ifp->vrf_id);
+ zclient_create_header(s, ZEBRA_INTERFACE_DELETE, ifp->vrf->vrf_id);
zserv_encode_interface(s, ifp);
client->ifdel_cnt++;
@@ -237,7 +237,7 @@ int zsend_interface_link_params(struct zserv *client, struct interface *ifp)
return 0;
}
- zclient_create_header(s, ZEBRA_INTERFACE_LINK_PARAMS, ifp->vrf_id);
+ zclient_create_header(s, ZEBRA_INTERFACE_LINK_PARAMS, ifp->vrf->vrf_id);
/* Add Interface Index */
stream_putl(s, ifp->ifindex);
@@ -299,7 +299,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, ifp->vrf_id);
+ zclient_create_header(s, cmd, ifp->vrf->vrf_id);
stream_putl(s, ifp->ifindex);
/* Interface address flag. */
@@ -341,7 +341,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, ifp->vrf_id);
+ zclient_create_header(s, cmd, ifp->vrf->vrf_id);
stream_putl(s, ifp->ifindex);
/* Prefix information. */
@@ -459,7 +459,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, ifp->vrf_id);
+ zclient_create_header(s, ZEBRA_INTERFACE_VRF_UPDATE, ifp->vrf->vrf_id);
/* Fill in the name of the interface and its new VRF (id) */
stream_put(s, ifp->name, INTERFACE_NAMSIZ);
@@ -534,7 +534,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, ifp->vrf_id);
+ zclient_create_header(s, cmd, ifp->vrf->vrf_id);
zserv_encode_interface(s, ifp);
if (cmd == ZEBRA_INTERFACE_UP)
@@ -985,7 +985,8 @@ void zsend_nhrp_neighbor_notify(int cmd, struct interface *ifp,
family2addrsize(sockunion_family(&ip)));
for (ALL_LIST_ELEMENTS(zrouter.client_list, node, nnode, client)) {
- if (!vrf_bitmap_check(client->nhrp_neighinfo[afi], ifp->vrf_id))
+ if (!vrf_bitmap_check(client->nhrp_neighinfo[afi],
+ ifp->vrf->vrf_id))
continue;
s = stream_new(ZEBRA_MAX_PACKET_SIZ);
@@ -3421,7 +3422,7 @@ static inline void zebra_gre_get(ZAPI_HANDLER_ARGS)
zebra_ns_lookup(gre_info->link_nsid),
gre_info->ifindex_link);
if (ifp_link)
- vrf_id_link = ifp_link->vrf_id;
+ vrf_id_link = ifp_link->vrf->vrf_id;
stream_putl(s, vrf_id_link);
stream_putl(s, gre_info->vtep_ip.s_addr);
stream_putl(s, gre_info->vtep_ip_remote.s_addr);