Commit 2bed9e2e50 for frr
commit 2bed9e2e50f198833680d82887537962d30e9ba2
Author: Rajasekar Raja <rajasekarr@nvidia.com>
Date: Fri Oct 30 07:10:37 2026 -0700
zebra: don't send SRv6 locator notifications to synchronous clients
zebra sends every SRv6 locator add and delete to all connected
clients, including synchronous ones such as the label manager
connection that bgpd keeps ("bgp [1]"). A synchronous client only
reads its socket while it waits for the reply to its own request, so
nobody picks these notifications up.
Once that socket is full, zebra stops flushing to it and the
notifications pile up in the client's output queue. If the daemon
never makes another synchronous request they are never freed, and
every locator change adds more of them to zebra's memory.
zebra already skips synchronous clients for its other unsolicited
messages. Do the same for SRv6 locator notifications. Daemons still
get them on their main connection, which is where they are handled.
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
diff --git a/zebra/zebra_srv6.c b/zebra/zebra_srv6.c
index 4f49bf348c..891f1d4071 100644
--- a/zebra/zebra_srv6.c
+++ b/zebra/zebra_srv6.c
@@ -948,6 +948,10 @@ void zebra_srv6_locator_add(struct srv6_locator *locator)
* not degrade the overall performance of FRRouting.
*/
frr_each (zserv_client_list, &zrouter.client_list, client) {
+ /* Do not send unsolicited messages to synchronous clients. */
+ if (client->synchronous)
+ continue;
+
zsend_zebra_srv6_locator_add(client, locator);
}
}
@@ -969,6 +973,10 @@ void zebra_srv6_locator_delete(struct srv6_locator *locator)
* owner of each chunk.
*/
frr_each (zserv_client_list, &zrouter.client_list, client) {
+ /* Do not send unsolicited messages to synchronous clients. */
+ if (client->synchronous)
+ continue;
+
zsend_zebra_srv6_locator_delete(client, locator);
}
@@ -1009,6 +1017,10 @@ void zebra_notify_srv6_locator_add(struct srv6_locator *locator)
* not degrade the overall performance of FRRouting.
*/
frr_each (zserv_client_list, &zrouter.client_list, client) {
+ /* Do not send unsolicited messages to synchronous clients. */
+ if (client->synchronous)
+ continue;
+
zsend_zebra_srv6_locator_add(client, locator);
}
}
@@ -1029,6 +1041,10 @@ void zebra_notify_srv6_locator_delete(struct srv6_locator *locator)
* owner of each chunk.
*/
frr_each (zserv_client_list, &zrouter.client_list, client) {
+ /* Do not send unsolicited messages to synchronous clients. */
+ if (client->synchronous)
+ continue;
+
zsend_zebra_srv6_locator_delete(client, locator);
}
}