diff options
Diffstat (limited to 'zebra/zserv.c')
| -rw-r--r-- | zebra/zserv.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/zebra/zserv.c b/zebra/zserv.c index 4b5791530d..484d94fac8 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -1033,6 +1033,9 @@ static void zebra_show_client_detail(struct vty *vty, struct zserv *client) } else vty_out(vty, "Not registered for Nexthop Updates\n"); + vty_out(vty, "Client will %sbe notified about it's routes status\n", + client->notify_owner ? "" : "Not "); + last_read_time = (time_t)atomic_load_explicit(&client->last_read_time, memory_order_relaxed); last_write_time = (time_t)atomic_load_explicit(&client->last_write_time, @@ -1300,6 +1303,21 @@ DEFUN (show_zebra_client_summary, return CMD_SUCCESS; } +static int zserv_client_close_cb(struct zserv *closed_client) +{ + struct listnode *node, *nnode; + struct zserv *client = NULL; + + for (ALL_LIST_ELEMENTS(zrouter.client_list, node, nnode, client)) { + if (client->proto == closed_client->proto) + continue; + + zsend_client_close_notify(client, closed_client); + } + + return 0; +} + void zserv_init(void) { /* Client list init. */ @@ -1312,4 +1330,6 @@ void zserv_init(void) install_element(ENABLE_NODE, &show_zebra_client_cmd); install_element(ENABLE_NODE, &show_zebra_client_summary_cmd); + + hook_register(zserv_client_close, zserv_client_close_cb); } |
