diff options
| author | Karen Schoener <karen@volta.io> | 2020-03-06 10:33:40 -0500 |
|---|---|---|
| committer | Karen Schoener <karen@volta.io> | 2020-03-23 09:17:17 -0400 |
| commit | 17da84a49dd665edf50d646d86e52cdf2c4c19b7 (patch) | |
| tree | 011923776c9c4bf65c50e8296ce51de8434cf9cf /zebra/zebra_vrf.c | |
| parent | 5d2724ec2564b648bf93dc7b164a1398cde3c214 (diff) | |
zebra: Synchronous client queues accumulate messages from zebra.
Zebra is currently sending messages on interface add/delete/update,
VRF add/delete, and interface address change - regardless of whether
its clients had requested them. This is problematic for lde and isis,
which only listens to label chunk messages, and only when it is
waiting for one (synchronous client). The effect is the that messages
accumulate on the lde synchronous message queue.
With this change:
- Zebra does not send unsolicited messages to synchronous clients.
- Synchronous clients send a ZEBRA_HELLO to zebra.
The ZEBRA_HELLO contains a new boolean field: sychronous.
- LDP and PIM have been updated to send a ZEBRA_HELLO for their
synchronous clients.
Signed-off-by: Karen Schoener <karen@voltanet.io>
Diffstat (limited to 'zebra/zebra_vrf.c')
| -rw-r--r-- | zebra/zebra_vrf.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c index c392303760..dfa7d5ae92 100644 --- a/zebra/zebra_vrf.c +++ b/zebra/zebra_vrf.c @@ -60,8 +60,13 @@ static void zebra_vrf_add_update(struct zebra_vrf *zvrf) if (IS_ZEBRA_DEBUG_EVENT) zlog_debug("MESSAGE: ZEBRA_VRF_ADD %s", zvrf_name(zvrf)); - for (ALL_LIST_ELEMENTS(zrouter.client_list, node, nnode, client)) + for (ALL_LIST_ELEMENTS(zrouter.client_list, node, nnode, client)) { + /* Do not send unsolicited messages to synchronous clients. */ + if (client->synchronous) + continue; + zsend_vrf_add(client, zvrf); + } } static void zebra_vrf_delete_update(struct zebra_vrf *zvrf) @@ -72,8 +77,13 @@ static void zebra_vrf_delete_update(struct zebra_vrf *zvrf) if (IS_ZEBRA_DEBUG_EVENT) zlog_debug("MESSAGE: ZEBRA_VRF_DELETE %s", zvrf_name(zvrf)); - for (ALL_LIST_ELEMENTS(zrouter.client_list, node, nnode, client)) + for (ALL_LIST_ELEMENTS(zrouter.client_list, node, nnode, client)) { + /* Do not send unsolicited messages to synchronous clients. */ + if (client->synchronous) + continue; + zsend_vrf_delete(client, zvrf); + } } void zebra_vrf_update_all(struct zserv *client) |
