From 3d4e59898c05c1633785fc0822a7f38fec001074 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Tue, 7 Nov 2023 03:40:26 +0200 Subject: [PATCH] mgmtd: fix local validation When validating the config, we shouldn't also validate state. Signed-off-by: Igor Ryzhov (cherry picked from commit b0ce3064576c160da2418229c1c09fd8b486e0a7) --- mgmtd/mgmt_txn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c index 53b9b7df46..452f9c8d34 100644 --- a/mgmtd/mgmt_txn.c +++ b/mgmtd/mgmt_txn.c @@ -1237,7 +1237,7 @@ static int mgmt_txn_prepare_config(struct mgmt_txn_ctx *txn) nb_ctx.client = NB_CLIENT_MGMTD_SERVER; nb_ctx.user = (void *)txn; - ret = nb_candidate_validate_yang(nb_config, false, err_buf, + ret = nb_candidate_validate_yang(nb_config, true, err_buf, sizeof(err_buf) - 1); if (ret != NB_OK) { if (strncmp(err_buf, " ", strlen(err_buf)) == 0)