* 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
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;
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;
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;
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;
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];
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;
}
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;
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);