]> git.puffer.fish Git - mirror/frr.git/commitdiff
mgmtd: fix local validation 14753/head
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 7 Nov 2023 01:40:26 +0000 (03:40 +0200)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Wed, 8 Nov 2023 13:50:36 +0000 (13:50 +0000)
When validating the config, we shouldn't also validate state.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit b0ce3064576c160da2418229c1c09fd8b486e0a7)

mgmtd/mgmt_txn.c

index eff3b7e34c1e15b821d0f51a18deb67c86ea0671..5405cda3d959b1386a4d31a87665dfa5c7e6f28e 100644 (file)
@@ -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)