]> git.proxmox.com Git - mirror_frr.git/commitdiff
pathd: fix render candidate-path bandwidth
authorEmanuele Di Pascale <emanuele@voltanet.io>
Tue, 18 May 2021 13:52:44 +0000 (15:52 +0200)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Tue, 1 Jun 2021 17:19:05 +0000 (19:19 +0200)
the config for dynamic candidate paths with bandwidth preferences
was using a different order of keywords (required bandwidth X) than
the corresponding command (bandwidth X required). This confuses
frr-reload, and possibly users too. Make both use the same order.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
pathd/path_cli.c

index 172737c9d407f87ce24e03bb5d0fdce14a9243c7..da41c96414d4817b34cec5d2596d7f6f42782550 100644 (file)
@@ -1195,9 +1195,10 @@ void cli_show_srte_policy_candidate_path(struct vty *vty,
                                dnode, "./constraints/bandwidth/value");
                        required = yang_dnode_get_bool(
                                dnode, "./constraints/bandwidth/required");
-                       vty_out(vty, "    %sbandwidth",
-                               required ? "required " : "");
+                       vty_out(vty, "    bandwidth");
                        config_write_float(vty, bandwidth);
+                       if (required)
+                               vty_out(vty, " required");
                        vty_out(vty, "\n");
                }
                if (yang_dnode_exists(dnode,