summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/developer/zebra.rst6
-rw-r--r--isisd/isis_zebra.c4
-rw-r--r--lib/zclient.c13
-rw-r--r--lib/zclient.h5
-rw-r--r--ospfd/ospf_zebra.c4
-rw-r--r--zebra/redistribute.c6
-rw-r--r--zebra/zapi_msg.c3
-rw-r--r--zebra/zebra_ptm_redistribute.c2
8 files changed, 22 insertions, 21 deletions
diff --git a/doc/developer/zebra.rst b/doc/developer/zebra.rst
index f771d48235..74a8605bf2 100644
--- a/doc/developer/zebra.rst
+++ b/doc/developer/zebra.rst
@@ -241,7 +241,7 @@ Zebra Protocol Commands
+------------------------------------+-------+
| ZEBRA_INTERFACE_DISABLE_RADV | 42 |
+------------------------------------+-------+
-| ZEBRA_IPV3_NEXTHOP_LOOKUP_MRIB | 44 |
+| ZEBRA_IPV3_NEXTHOP_LOOKUP_MRIB | 43 |
+------------------------------------+-------+
| ZEBRA_INTERFACE_LINK_PARAMS | 44 |
+------------------------------------+-------+
@@ -279,9 +279,9 @@ Zebra Protocol Commands
+------------------------------------+-------+
| ZEBRA_VNI_DEL | 61 |
+------------------------------------+-------+
-| ZEBRA_L2VNI_ADD | 63 |
+| ZEBRA_L3VNI_ADD | 62 |
+------------------------------------+-------+
-| ZEBRA_L2VNI_DEL | 64 |
+| ZEBRA_L3VNI_DEL | 63 |
+------------------------------------+-------+
| ZEBRA_REMOTE_VTEP_ADD | 64 |
+------------------------------------+-------+
diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c
index 958f8c2281..d03c1dde08 100644
--- a/isisd/isis_zebra.c
+++ b/isisd/isis_zebra.c
@@ -219,11 +219,11 @@ static int isis_zebra_if_address_del(int command, struct zclient *client,
}
static int isis_zebra_link_params(int command, struct zclient *zclient,
- zebra_size_t length)
+ zebra_size_t length, vrf_id_t vrf_id)
{
struct interface *ifp;
- ifp = zebra_interface_link_params_read(zclient->ibuf);
+ ifp = zebra_interface_link_params_read(zclient->ibuf, vrf_id);
if (ifp == NULL)
return 0;
diff --git a/lib/zclient.c b/lib/zclient.c
index cc936d47d7..187a4b20b0 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -457,8 +457,7 @@ void zclient_send_reg_requests(struct zclient *zclient, vrf_id_t vrf_id)
vrf_id);
/* If default information is needed. */
- if (vrf_bitmap_check(zclient->default_information[afi],
- VRF_DEFAULT))
+ if (vrf_bitmap_check(zclient->default_information[afi], vrf_id))
zebra_redistribute_default_send(
ZEBRA_REDISTRIBUTE_DEFAULT_ADD, zclient, afi,
vrf_id);
@@ -525,8 +524,7 @@ void zclient_send_dereg_requests(struct zclient *zclient, vrf_id_t vrf_id)
i, 0, vrf_id);
/* If default information is needed. */
- if (vrf_bitmap_check(zclient->default_information[afi],
- VRF_DEFAULT))
+ if (vrf_bitmap_check(zclient->default_information[afi], vrf_id))
zebra_redistribute_default_send(
ZEBRA_REDISTRIBUTE_DEFAULT_DELETE, zclient, afi,
vrf_id);
@@ -1497,7 +1495,8 @@ static void link_params_set_value(struct stream *s, struct if_link_params *iflp)
iflp->use_bw = stream_getf(s);
}
-struct interface *zebra_interface_link_params_read(struct stream *s)
+struct interface *zebra_interface_link_params_read(struct stream *s,
+ vrf_id_t vrf_id)
{
struct if_link_params *iflp;
ifindex_t ifindex;
@@ -1506,7 +1505,7 @@ struct interface *zebra_interface_link_params_read(struct stream *s)
ifindex = stream_getl(s);
- struct interface *ifp = if_lookup_by_index(ifindex, VRF_DEFAULT);
+ struct interface *ifp = if_lookup_by_index(ifindex, vrf_id);
if (ifp == NULL) {
flog_err(EC_LIB_ZAPI_ENCODE,
@@ -2583,7 +2582,7 @@ static int zclient_read(struct thread *thread)
case ZEBRA_INTERFACE_LINK_PARAMS:
if (zclient->interface_link_params)
(*zclient->interface_link_params)(command, zclient,
- length);
+ length, vrf_id);
break;
case ZEBRA_FEC_UPDATE:
if (zclient_debug)
diff --git a/lib/zclient.h b/lib/zclient.h
index 401d6c400a..95f0a990b2 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -229,7 +229,7 @@ struct zclient {
int (*interface_address_add)(int, struct zclient *, uint16_t, vrf_id_t);
int (*interface_address_delete)(int, struct zclient *, uint16_t,
vrf_id_t);
- int (*interface_link_params)(int, struct zclient *, uint16_t);
+ int (*interface_link_params)(int, struct zclient *, uint16_t, vrf_id_t);
int (*interface_bfd_dest_update)(int, struct zclient *, uint16_t,
vrf_id_t);
int (*interface_nbr_address_add)(int, struct zclient *, uint16_t,
@@ -564,7 +564,8 @@ extern struct interface *zebra_interface_vrf_update_read(struct stream *s,
extern void zebra_interface_if_set_value(struct stream *, struct interface *);
extern void zebra_router_id_update_read(struct stream *s, struct prefix *rid);
-extern struct interface *zebra_interface_link_params_read(struct stream *);
+extern struct interface *zebra_interface_link_params_read(struct stream *s,
+ vrf_id_t vrf_id);
extern size_t zebra_interface_link_params_write(struct stream *,
struct interface *);
extern int zclient_send_get_label_chunk(
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 991d0063d6..a86800f901 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -340,11 +340,11 @@ static int ospf_interface_address_delete(int command, struct zclient *zclient,
}
static int ospf_interface_link_params(int command, struct zclient *zclient,
- zebra_size_t length)
+ zebra_size_t length, vrf_id_t vrf_id)
{
struct interface *ifp;
- ifp = zebra_interface_link_params_read(zclient->ibuf);
+ ifp = zebra_interface_link_params_read(zclient->ibuf, vrf_id);
if (ifp == NULL)
return 0;
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index b9c1f0aefd..c5769ae06f 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -405,7 +405,7 @@ void zebra_interface_up_update(struct interface *ifp)
if (ifp->ptm_status || !ifp->ptm_enable) {
for (ALL_LIST_ELEMENTS(zebrad.client_list, node, nnode, client))
- if (client->ifinfo) {
+ if (vrf_bitmap_check(client->ifinfo, ifp->vrf_id)) {
zsend_interface_update(ZEBRA_INTERFACE_UP,
client, ifp);
zsend_interface_link_params(client, ifp);
@@ -439,7 +439,7 @@ void zebra_interface_add_update(struct interface *ifp)
ifp->vrf_id);
for (ALL_LIST_ELEMENTS(zebrad.client_list, node, nnode, client))
- if (client->ifinfo) {
+ if (vrf_bitmap_check(client->ifinfo, ifp->vrf_id)) {
client->ifadd_cnt++;
zsend_interface_add(client, ifp);
zsend_interface_link_params(client, ifp);
@@ -812,6 +812,6 @@ void zebra_interface_parameters_update(struct interface *ifp)
ifp->name, ifp->vrf_id);
for (ALL_LIST_ELEMENTS(zebrad.client_list, node, nnode, client))
- if (client->ifinfo)
+ if (vrf_bitmap_check(client->ifinfo, ifp->vrf_id))
zsend_interface_link_params(client, ifp);
}
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 15f9da0cba..d3994fd4a8 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -209,7 +209,7 @@ int zsend_interface_link_params(struct zserv *client, struct interface *ifp)
struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ);
/* Check this client need interface information. */
- if (!client->ifinfo) {
+ if (!vrf_bitmap_check(client->ifinfo, ifp->vrf_id)) {
stream_free(s);
return 0;
}
@@ -1324,6 +1324,7 @@ static void zread_interface_add(ZAPI_HANDLER_ARGS)
continue;
zsend_interface_add(client, ifp);
+ zsend_interface_link_params(client, ifp);
zsend_interface_addresses(client, ifp);
}
}
diff --git a/zebra/zebra_ptm_redistribute.c b/zebra/zebra_ptm_redistribute.c
index 420105198b..3acbe3bf2c 100644
--- a/zebra/zebra_ptm_redistribute.c
+++ b/zebra/zebra_ptm_redistribute.c
@@ -37,7 +37,7 @@ static int zsend_interface_bfd_update(int cmd, struct zserv *client,
struct stream *s;
/* Check this client need interface information. */
- if (!client->ifinfo)
+ if (!vrf_bitmap_check(client->ifinfo, ifp->vrf_id))
return 0;
s = stream_new(ZEBRA_MAX_PACKET_SIZ);