]> git.puffer.fish Git - matthieu/frr.git/commitdiff
mgmtd: fix reply when running ds is not locked
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 21 Nov 2023 21:18:40 +0000 (23:18 +0200)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 21 Nov 2023 21:18:40 +0000 (23:18 +0200)
At this stage, we should send a SET_CFG reply, not COMMIT_CFG reply.
Commit request is not yet initialized.

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

index 8a9486784e0a5c1b17a02a474e43f070a20124be..53457e8969d5d7f93c364e5bc2225904dfca9c84 100644 (file)
@@ -614,9 +614,12 @@ static void mgmt_txn_process_set_cfg(struct event *thread)
                                              txn_req->req.set_cfg->dst_ds_id,
                                              txn->txn_id, txn->session_id,
                                              strerror(ret));
-                               mgmt_txn_send_commit_cfg_reply(
-                                       txn, MGMTD_DS_LOCK_FAILED,
-                                       "running DS not locked for implicit commit");
+                               mgmt_fe_send_set_cfg_reply(
+                                       txn->session_id, txn->txn_id,
+                                       txn_req->req.set_cfg->ds_id,
+                                       txn_req->req_id, MGMTD_DS_LOCK_FAILED,
+                                       "running DS not locked for implicit commit",
+                                       txn_req->req.set_cfg->implicit_commit);
                                goto mgmt_txn_process_set_cfg_done;
                        }