ospfd: fix cli shown in running config when turning off ldp-sync

LDP-Sync is automatically enabled on interfaces when turned on in
router ospf context.   The user can remove ldp-sync from running
on an interface, by issuing a "no ip ospd mpls ldp-sync" command.
To remove all ldp-sync interface commands the user must delete
ldp-sync at the router level.  The code was not correctly removing
the config.   This PR fixes that issue.   Now the extra cli
ldp-sync commands are removed when ldp-sync is disabled.

Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
This commit is contained in:
lynnemorrison 2024-02-13 10:20:11 -05:00
parent 7b94a923ae
commit 5d5ac73b67

View File

@ -774,7 +774,7 @@ DEFPY (no_ospf_mpls_ldp_sync,
"Disable MPLS LDP-IGP Sync\n") "Disable MPLS LDP-IGP Sync\n")
{ {
VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf); VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf);
ospf_ldp_sync_gbl_exit(ospf, false); ospf_ldp_sync_gbl_exit(ospf, true);
return CMD_SUCCESS; return CMD_SUCCESS;
} }