summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2021-06-01 22:26:56 +0200
committerGitHub <noreply@github.com>2021-06-01 22:26:56 +0200
commit8a31e38fefcd660bf297bc314baf490c6f77e7c0 (patch)
treeb1a6968cc4f0aa509740147a026c1eb6c95dd6f7 /isisd
parentMerge pull request #8765 from idryzhov/bfd-vrf (diff)
parentisisd: fix using vrf interface as a loopback (diff)
downloadfrr-8a31e38fefcd660bf297bc314baf490c6f77e7c0.tar.xz
frr-8a31e38fefcd660bf297bc314baf490c6f77e7c0.zip
Merge pull request #8761 from idryzhov/fix-isis-vrf
isisd: fix using vrf interface as a loopback
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_circuit.c4
-rw-r--r--isisd/isis_cli.c4
-rw-r--r--isisd/isis_nb_config.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index 2a197ab2b..4fa28a4ad 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -497,7 +497,7 @@ void isis_circuit_if_add(struct isis_circuit *circuit, struct interface *ifp)
circuit->circ_type = CIRCUIT_T_BROADCAST;
} else if (if_is_pointopoint(ifp)) {
circuit->circ_type = CIRCUIT_T_P2P;
- } else if (if_is_loopback(ifp)) {
+ } else if (if_is_loopback_or_vrf(ifp)) {
circuit->circ_type = CIRCUIT_T_LOOPBACK;
circuit->is_passive = 1;
} else {
@@ -1350,7 +1350,7 @@ ferr_r isis_circuit_passive_set(struct isis_circuit *circuit, bool passive)
if (circuit->is_passive == passive)
return ferr_ok();
- if (if_is_loopback(circuit->interface) && !passive)
+ if (if_is_loopback_or_vrf(circuit->interface) && !passive)
return ferr_cfg_invalid("loopback is always passive");
if (circuit->state != C_STATE_UP) {
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index 5aea9f25d..415c25fbf 100644
--- a/isisd/isis_cli.c
+++ b/isisd/isis_cli.c
@@ -195,7 +195,7 @@ DEFPY_YANG(ip_router_isis, ip_router_isis_cmd,
/* check if the interface is a loopback and if so set it as passive */
ifp = nb_running_get_entry(NULL, VTY_CURR_XPATH, false);
- if (ifp && if_is_loopback(ifp))
+ if (ifp && if_is_loopback_or_vrf(ifp))
nb_cli_enqueue_change(vty, "./frr-isisd:isis/passive",
NB_OP_MODIFY, "true");
@@ -252,7 +252,7 @@ DEFPY_YANG(ip6_router_isis, ip6_router_isis_cmd,
/* check if the interface is a loopback and if so set it as passive */
ifp = nb_running_get_entry(NULL, VTY_CURR_XPATH, false);
- if (ifp && if_is_loopback(ifp))
+ if (ifp && if_is_loopback_or_vrf(ifp))
nb_cli_enqueue_change(vty, "./frr-isisd:isis/passive",
NB_OP_MODIFY, "true");
diff --git a/isisd/isis_nb_config.c b/isisd/isis_nb_config.c
index a00c86eea..2622c5b51 100644
--- a/isisd/isis_nb_config.c
+++ b/isisd/isis_nb_config.c
@@ -2966,7 +2966,7 @@ int lib_interface_isis_passive_modify(struct nb_cb_modify_args *args)
ifp = circuit->interface;
if (!ifp)
return NB_OK;
- if (if_is_loopback(ifp)) {
+ if (if_is_loopback_or_vrf(ifp)) {
snprintf(args->errmsg, args->errmsg_len,
"Loopback is always passive");
return NB_ERR_VALIDATION;