Merge pull request #8761 from idryzhov/fix-isis-vrf

isisd: fix using vrf interface as a loopback
This commit is contained in:
Donald Sharp 2021-06-01 16:26:56 -04:00 committed by GitHub
commit 8a31e38fef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -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) {

View File

@ -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");

View File

@ -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;