diff options
Diffstat (limited to 'ospfd/ospf_vty.c')
| -rw-r--r-- | ospfd/ospf_vty.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 4c5c5234ad..c87d357b4b 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -2602,28 +2602,38 @@ ALIAS(no_ospf_write_multiplier, no_write_multiplier_cmd, "Write multiplier\n" "Maximum number of interface serviced per write\n") -DEFUN(ospf_ti_lfa, ospf_ti_lfa_cmd, "fast-reroute ti-lfa", +DEFUN(ospf_ti_lfa, ospf_ti_lfa_cmd, "fast-reroute ti-lfa [node-protection]", "Fast Reroute for MPLS and IP resilience\n" - "Topology Independent LFA (Loop-Free Alternate)\n") + "Topology Independent LFA (Loop-Free Alternate)\n" + "TI-LFA node protection (default is link protection)\n") { VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf); ospf->ti_lfa_enabled = true; + if (argc == 3) + ospf->ti_lfa_protection_type = OSPF_TI_LFA_NODE_PROTECTION; + else + ospf->ti_lfa_protection_type = OSPF_TI_LFA_LINK_PROTECTION; + ospf_spf_calculate_schedule(ospf, SPF_FLAG_CONFIG_CHANGE); return CMD_SUCCESS; } -DEFUN(no_ospf_ti_lfa, no_ospf_ti_lfa_cmd, "no fast-reroute ti-lfa", +DEFUN(no_ospf_ti_lfa, no_ospf_ti_lfa_cmd, + "no fast-reroute ti-lfa [node-protection]", NO_STR "Fast Reroute for MPLS and IP resilience\n" - "Topology Independent LFA (Loop-Free Alternate)\n") + "Topology Independent LFA (Loop-Free Alternate)\n" + "TI-LFA node protection (default is link protection)\n") { VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf); ospf->ti_lfa_enabled = false; + ospf->ti_lfa_protection_type = OSPF_TI_LFA_UNDEFINED_PROTECTION; + ospf_spf_calculate_schedule(ospf, SPF_FLAG_CONFIG_CHANGE); return CMD_SUCCESS; @@ -12389,8 +12399,12 @@ static int ospf_config_write_one(struct vty *vty, struct ospf *ospf) } /* TI-LFA print. */ - if (ospf->ti_lfa_enabled) - vty_out(vty, " fast-reroute ti-lfa\n"); + if (ospf->ti_lfa_enabled) { + if (ospf->ti_lfa_protection_type == OSPF_TI_LFA_NODE_PROTECTION) + vty_out(vty, " fast-reroute ti-lfa node-protection\n"); + else + vty_out(vty, " fast-reroute ti-lfa\n"); + } /* Network area print. */ config_write_network_area(vty, ospf); |
