summaryrefslogtreecommitdiff
path: root/pathd/path_pcep_cli.c
diff options
context:
space:
mode:
authorEmanuele Di Pascale <emanuele@voltanet.io>2020-12-22 17:00:39 +0100
committerEmanuele Di Pascale <emanuele@voltanet.io>2021-01-09 15:50:17 +0100
commit2f1406fc863bace0870681483d0096ba12eef492 (patch)
tree6c1856c3292be247bb265fb054dd4d28f230bd43 /pathd/path_pcep_cli.c
parentee96c52a2828335c698c27ee7f7374204a97d4cb (diff)
pathd, tools: fix peer preference config
on one hand, the default value for a peer preference was always being displayed, and on the other there was some code in frr-reload.py which was attempting to add a default value to match this behavior, and which was incorrectly overriding a specified preference. Fix this by removing this code and making pathd behave like other daemons in this respect, i.e. not displaying the default value. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Diffstat (limited to 'pathd/path_pcep_cli.c')
-rw-r--r--pathd/path_pcep_cli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pathd/path_pcep_cli.c b/pathd/path_pcep_cli.c
index f80814f17c..1e37304096 100644
--- a/pathd/path_pcep_cli.c
+++ b/pathd/path_pcep_cli.c
@@ -1479,7 +1479,8 @@ int pcep_cli_pcc_config_write(struct vty *vty)
csnprintfrr(buf, sizeof(buf), " peer %s",
pce_opts->pce_name);
- if (pce_opts->precedence > 0) {
+ if (pce_opts->precedence > 0
+ && pce_opts->precedence != DEFAULT_PCE_PRECEDENCE) {
csnprintfrr(buf, sizeof(buf), " %s %d",
PCEP_VTYSH_ARG_PRECEDENCE,
pce_opts->precedence);