]> git.puffer.fish Git - mirror/frr.git/commitdiff
mgmtd: fix get-data transaction hangup
authorIgor Ryzhov <iryzhov@nfware.com>
Sat, 27 Jan 2024 23:18:10 +0000 (01:18 +0200)
committerIgor Ryzhov <iryzhov@nfware.com>
Sat, 27 Jan 2024 23:18:10 +0000 (01:18 +0200)
When no data requests were sent to the backends, return immediately,
instead of waiting for a timeout. This can happen if backends providing
the requested data are not connected to mgmtd.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
mgmtd/mgmt_txn.c

index 786fa0d0a3e12da5059be2ca0887cfcf088c43dd..7f88524e85b10926e8b3f83674eaea03dabb53ce 100644 (file)
@@ -2441,6 +2441,10 @@ state:
 
        mgmt_msg_native_free_msg(msg);
 
+       /* Return if we didn't send any messages to backends */
+       if (!get_tree->sent_clients)
+               return txn_get_tree_data_done(txn, txn_req);
+
        /* Start timeout timer - pulled out of register event code so we can
         * pass a different arg
         */