summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zebra/zebra_rib.c9
-rw-r--r--zebra/zebra_vxlan.c6
-rw-r--r--zebra/zserv.c11
-rw-r--r--zebra/zserv.h6
4 files changed, 17 insertions, 15 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index b7b68b7272..791f319120 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1033,8 +1033,9 @@ int rib_install_kernel(struct route_node *rn, struct route_entry *re,
* know that they've lost
*/
if (old && old != re)
- zsend_route_notify_owner(old->type, old->vrf_id,
- p, ZAPI_ROUTE_BETTER_ADMIN_WON);
+ zsend_route_notify_owner(old->type, old->instance,
+ old->vrf_id, p,
+ ZAPI_ROUTE_BETTER_ADMIN_WON);
/*
* Make sure we update the FPM any time we send new information to
@@ -1055,10 +1056,10 @@ int rib_install_kernel(struct route_node *rn, struct route_entry *re,
else
UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB);
}
- zsend_route_notify_owner(re->type, re->vrf_id,
+ zsend_route_notify_owner(re->type, re->instance, re->vrf_id,
p, ZAPI_ROUTE_INSTALLED);
} else
- zsend_route_notify_owner(re->type, re->vrf_id,
+ zsend_route_notify_owner(re->type, re->instance, re->vrf_id,
p, ZAPI_ROUTE_FAIL_INSTALL);
return ret;
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index f5caf9d0b9..9c70b55a1a 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -759,7 +759,7 @@ static int zvni_macip_send_msg_to_client(vni_t vni,
char buf[ETHER_ADDR_STRLEN];
char buf2[INET6_ADDRSTRLEN];
- client = zebra_find_client(ZEBRA_ROUTE_BGP);
+ client = zebra_find_client(ZEBRA_ROUTE_BGP, 0);
/* BGP may not be running. */
if (!client)
return 0;
@@ -2122,7 +2122,7 @@ static int zvni_send_add_to_client(zebra_vni_t *zvni)
struct zserv *client;
struct stream *s;
- client = zebra_find_client(ZEBRA_ROUTE_BGP);
+ client = zebra_find_client(ZEBRA_ROUTE_BGP, 0);
/* BGP may not be running. */
if (!client)
return 0;
@@ -2154,7 +2154,7 @@ static int zvni_send_del_to_client(vni_t vni)
struct zserv *client;
struct stream *s;
- client = zebra_find_client(ZEBRA_ROUTE_BGP);
+ client = zebra_find_client(ZEBRA_ROUTE_BGP, 0);
/* BGP may not be running. */
if (!client)
return 0;
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 7b1839930e..b6d70084c0 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -988,15 +988,15 @@ static int zsend_ipv4_nexthop_lookup_mrib(struct zserv *client,
return zebra_server_send_message(client);
}
-int zsend_route_notify_owner(u_char proto, vrf_id_t vrf_id,
- struct prefix *p,
+int zsend_route_notify_owner(u_char proto, u_short instance,
+ vrf_id_t vrf_id, struct prefix *p,
enum zapi_route_notify_owner note)
{
struct zserv *client;
struct stream *s;
uint8_t blen;
- client = zebra_find_client(proto);
+ client = zebra_find_client(proto, instance);
if (!client || !client->notify_owner) {
if (IS_ZEBRA_DEBUG_PACKET) {
char buff[PREFIX_STRLEN];
@@ -3003,13 +3003,14 @@ static void zebra_show_client_brief(struct vty *vty, struct zserv *client)
client->v6_route_del_cnt);
}
-struct zserv *zebra_find_client(u_char proto)
+struct zserv *zebra_find_client(u_char proto, u_short instance)
{
struct listnode *node, *nnode;
struct zserv *client;
for (ALL_LIST_ELEMENTS(zebrad.client_list, node, nnode, client)) {
- if (client->proto == proto)
+ if (client->proto == proto &&
+ client->instance == instance)
return client;
}
diff --git a/zebra/zserv.h b/zebra/zserv.h
index a62f1c89fc..6077dc105a 100644
--- a/zebra/zserv.h
+++ b/zebra/zserv.h
@@ -185,8 +185,8 @@ extern int zsend_interface_vrf_update(struct zserv *, struct interface *,
extern int zsend_interface_link_params(struct zserv *, struct interface *);
extern int zsend_pw_update(struct zserv *, struct zebra_pw *);
-extern int zsend_route_notify_owner(u_char proto, vrf_id_t vrf_id,
- struct prefix *p,
+extern int zsend_route_notify_owner(u_char proto, u_short instance,
+ vrf_id_t vrf_id, struct prefix *p,
enum zapi_route_notify_owner note);
extern pid_t pid;
@@ -197,7 +197,7 @@ extern void zserv_nexthop_num_warn(const char *, const struct prefix *,
const unsigned int);
extern int zebra_server_send_message(struct zserv *client);
-extern struct zserv *zebra_find_client(u_char proto);
+extern struct zserv *zebra_find_client(u_char proto, u_short instance);
#if defined(HANDLE_ZAPI_FUZZING)
extern void zserv_read_file(char *input);