summaryrefslogtreecommitdiff
path: root/isisd/isis_cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'isisd/isis_cli.c')
-rw-r--r--isisd/isis_cli.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index 735e39a377..c86d929903 100644
--- a/isisd/isis_cli.c
+++ b/isisd/isis_cli.c
@@ -2365,31 +2365,27 @@ DEFPY_YANG (isis_frr_lfa_tiebreaker,
if (!level || strmatch(level, "level-1")) {
if (no) {
- snprintf(
- xpath, XPATH_MAXLEN,
- "./fast-reroute/level-1/lfa/tiebreaker[index='%s']",
- index_str);
+ snprintf(xpath, XPATH_MAXLEN,
+ "./fast-reroute/level-1/lfa/tiebreaker[index='%s'][type='%s']",
+ index_str, type);
nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL);
} else {
- snprintf(
- xpath, XPATH_MAXLEN,
- "./fast-reroute/level-1/lfa/tiebreaker[index='%s']/type",
- index_str);
+ snprintf(xpath, XPATH_MAXLEN,
+ "./fast-reroute/level-1/lfa/tiebreaker[index='%s'][type='%s']/type",
+ index_str, type);
nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, type);
}
}
if (!level || strmatch(level, "level-2")) {
if (no) {
- snprintf(
- xpath, XPATH_MAXLEN,
- "./fast-reroute/level-2/lfa/tiebreaker[index='%s']",
- index_str);
+ snprintf(xpath, XPATH_MAXLEN,
+ "./fast-reroute/level-2/lfa/tiebreaker[index='%s'][type='%s']",
+ index_str, type);
nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL);
} else {
- snprintf(
- xpath, XPATH_MAXLEN,
- "./fast-reroute/level-2/lfa/tiebreaker[index='%s']/type",
- index_str);
+ snprintf(xpath, XPATH_MAXLEN,
+ "./fast-reroute/level-2/lfa/tiebreaker[index='%s'][type='%s']/type",
+ index_str, type);
nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, type);
}
}