]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix pending commit check 8453/head
authorIgor Ryzhov <iryzhov@nfware.com>
Mon, 12 Apr 2021 13:42:51 +0000 (16:42 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Mon, 12 Apr 2021 13:42:51 +0000 (16:42 +0300)
Calling nb_cli_pending_commit_check only makes sense after nb_cli_apply_changes.

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

index 9ecf02aae035481f2e215f11e02739b747c38e82..1e465d2620f91f1dc20795db56c541843b6cd341 100644 (file)
@@ -1390,7 +1390,6 @@ DEFUN_YANG_NOSH(router_bgp,
                                              NB_OP_MODIFY, "true");
                }
 
-               nb_cli_pending_commit_check(vty);
                ret = nb_cli_apply_changes(vty, base_xpath);
                if (ret == CMD_SUCCESS) {
                        VTY_PUSH_XPATH(BGP_NODE, base_xpath);
@@ -1399,6 +1398,7 @@ DEFUN_YANG_NOSH(router_bgp,
                         * For backward compatibility with old commands we still
                         * need to use the qobj infrastructure.
                         */
+                       nb_cli_pending_commit_check(vty);
                        bgp = bgp_lookup(as, name);
                        if (bgp)
                                VTY_PUSH_CONTEXT(BGP_NODE, bgp);