mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 20:55:25 +00:00
isisd: remove useless checks when configuring ldp-sync
We have checks on NB validation stage to prevent configuring LDP sync on interfaces in non-default VRFs. These checks are completely useless, because the interface can be easily moved to another VRF after configuring LDP sync. Instead, the check must be done in the actual code to cover the case when the interface is moved between VRFs. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
67486f32ae
commit
b11f166c3e
@ -486,6 +486,9 @@ void isis_if_ldp_sync_enable(struct isis_circuit *circuit)
|
||||
if (if_is_loopback(circuit->interface))
|
||||
return;
|
||||
|
||||
if (circuit->interface->vrf->vrf_id != VRF_DEFAULT)
|
||||
return;
|
||||
|
||||
ils_debug("ldp_sync: enable if %s", circuit->interface->name);
|
||||
|
||||
if (!CHECK_FLAG(area->ldp_sync_cmd.flags, LDP_SYNC_FLAG_ENABLE))
|
||||
|
@ -3188,19 +3188,9 @@ int lib_interface_isis_mpls_ldp_sync_modify(struct nb_cb_modify_args *args)
|
||||
struct isis_circuit *circuit;
|
||||
struct ldp_sync_info *ldp_sync_info;
|
||||
bool ldp_sync_enable;
|
||||
const char *vrfname;
|
||||
|
||||
switch (args->event) {
|
||||
case NB_EV_VALIDATE:
|
||||
vrfname = yang_dnode_get_string(
|
||||
lyd_parent(lyd_parent(lyd_parent(args->dnode))),
|
||||
"./vrf");
|
||||
if (strcmp(vrfname, VRF_DEFAULT_NAME)) {
|
||||
snprintf(args->errmsg, args->errmsg_len,
|
||||
"LDP-Sync only runs on Default VRF");
|
||||
return NB_ERR_VALIDATION;
|
||||
}
|
||||
break;
|
||||
case NB_EV_PREPARE:
|
||||
case NB_EV_ABORT:
|
||||
break;
|
||||
@ -3232,19 +3222,9 @@ int lib_interface_isis_mpls_holddown_modify(struct nb_cb_modify_args *args)
|
||||
struct isis_circuit *circuit;
|
||||
struct ldp_sync_info *ldp_sync_info;
|
||||
uint16_t holddown;
|
||||
const char *vrfname;
|
||||
|
||||
switch (args->event) {
|
||||
case NB_EV_VALIDATE:
|
||||
vrfname = yang_dnode_get_string(
|
||||
lyd_parent(lyd_parent(lyd_parent(args->dnode))),
|
||||
"./vrf");
|
||||
if (strcmp(vrfname, VRF_DEFAULT_NAME)) {
|
||||
snprintf(args->errmsg, args->errmsg_len,
|
||||
"LDP-Sync only runs on Default VRF");
|
||||
return NB_ERR_VALIDATION;
|
||||
}
|
||||
break;
|
||||
case NB_EV_PREPARE:
|
||||
case NB_EV_ABORT:
|
||||
break;
|
||||
@ -3265,19 +3245,9 @@ int lib_interface_isis_mpls_holddown_destroy(struct nb_cb_destroy_args *args)
|
||||
{
|
||||
struct isis_circuit *circuit;
|
||||
struct ldp_sync_info *ldp_sync_info;
|
||||
const char *vrfname;
|
||||
|
||||
switch (args->event) {
|
||||
case NB_EV_VALIDATE:
|
||||
vrfname = yang_dnode_get_string(
|
||||
lyd_parent(lyd_parent(lyd_parent(args->dnode))),
|
||||
"./vrf");
|
||||
if (strcmp(vrfname, VRF_DEFAULT_NAME)) {
|
||||
snprintf(args->errmsg, args->errmsg_len,
|
||||
"LDP-Sync only runs on Default VRF");
|
||||
return NB_ERR_VALIDATION;
|
||||
}
|
||||
break;
|
||||
case NB_EV_PREPARE:
|
||||
case NB_EV_ABORT:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user