summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-06-02 12:45:57 +0200
committerDonatas Abraitis <donatas@opensourcerouting.org>2022-06-07 15:11:46 +0200
commitd2e02cbf6434d45abea6309636f74ce365dfc731 (patch)
tree9373c784642e1397bb618e0270325684fabf9879
parentMerge pull request #11314 from chiragshah6/fdev2 (diff)
downloadfrr-d2e02cbf6434d45abea6309636f74ce365dfc731.tar.xz
frr-d2e02cbf6434d45abea6309636f74ce365dfc731.zip
ospfd: Remove local-block deprecated command
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
-rw-r--r--doc/developer/ospf-sr.rst3
-rw-r--r--doc/user/ospfd.rst6
-rw-r--r--ospfd/ospf_sr.c80
-rw-r--r--tests/topotests/ospf_sr_te_topo1/rt1/ospfd.conf1
-rw-r--r--tests/topotests/ospf_sr_te_topo1/rt2/ospfd.conf1
-rw-r--r--tests/topotests/ospf_sr_te_topo1/rt3/ospfd.conf1
-rw-r--r--tests/topotests/ospf_sr_te_topo1/rt4/ospfd.conf1
-rw-r--r--tests/topotests/ospf_sr_te_topo1/rt5/ospfd.conf1
-rw-r--r--tests/topotests/ospf_sr_te_topo1/rt6/ospfd.conf1
-rw-r--r--tests/topotests/ospf_te_topo1/r4/ospfd.conf3
-rw-r--r--tests/topotests/ospf_te_topo1/test_ospf_te_topo1.py2
11 files changed, 3 insertions, 97 deletions
diff --git a/doc/developer/ospf-sr.rst b/doc/developer/ospf-sr.rst
index 263db9dfb..1c164433d 100644
--- a/doc/developer/ospf-sr.rst
+++ b/doc/developer/ospf-sr.rst
@@ -310,8 +310,7 @@ Routing.
ospf router-id 192.168.1.11
capability opaque
segment-routing on
- segment-routing global-block 10000 19999
- segment-routing local-block 5000 5999
+ segment-routing global-block 10000 19999 local-block 5000 5999
segment-routing node-msd 8
segment-routing prefix 192.168.1.11/32 index 1100
diff --git a/doc/user/ospfd.rst b/doc/user/ospfd.rst
index d1a0bb6f7..bac382faa 100644
--- a/doc/user/ospfd.rst
+++ b/doc/user/ospfd.rst
@@ -985,12 +985,6 @@ dataplane.
Block, i.e. the label range used for Adjacency SID. The negative version
of the command always unsets both ranges.
-.. clicmd:: segment-routing local-block (16-1048575) (16-1048575)
-
- Set the Segment Routing Local Block i.e. the label range used by MPLS to
- store label in the MPLS FIB for Adjacency SID. This command is deprecated
- in favor of the combined command above.
-
.. clicmd:: segment-routing node-msd (1-16)
Fix the Maximum Stack Depth supported by the router. The value depend of the
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c
index 8fa5ce77b..2c7c80686 100644
--- a/ospfd/ospf_sr.c
+++ b/ospfd/ospf_sr.c
@@ -2302,84 +2302,6 @@ DEFUN(no_sr_global_label_range, no_sr_global_label_range_cmd,
return CMD_SUCCESS;
}
-#if CONFDATE > 20220528
-CPP_NOTICE(
- "Use of the segment-routing local-block command is deprecated, use the combined global-block command instead")
-#endif
-
-DEFUN_HIDDEN(sr_local_label_range, sr_local_label_range_cmd,
- "segment-routing local-block (16-1048575) (16-1048575)",
- SR_STR
- "Segment Routing Local Block label range\n"
- "Lower-bound range in decimal (16-1048575)\n"
- "Upper-bound range in decimal (16-1048575)\n")
-{
- uint32_t upper;
- uint32_t lower;
- uint32_t srgb_upper;
- int idx_low = 2;
- int idx_up = 3;
-
- /* Get lower and upper bound */
- lower = strtoul(argv[idx_low]->arg, NULL, 10);
- upper = strtoul(argv[idx_up]->arg, NULL, 10);
-
- /* check correctness of SRLB */
- if (!sr_range_is_valid(lower, upper, MIN_SRLB_SIZE)) {
- vty_out(vty, "Invalid SRLB range\n");
- return CMD_WARNING_CONFIG_FAILED;
- }
-
- /* Check if values have changed */
- if ((OspfSR.srlb.start == lower)
- && (OspfSR.srlb.end == upper))
- return CMD_SUCCESS;
-
- /* Validate SRLB against SRGB */
- srgb_upper = OspfSR.srgb.start + OspfSR.srgb.size - 1;
-
- if (ranges_overlap(OspfSR.srgb.start, srgb_upper, lower, upper)) {
- vty_out(vty,
- "New SR Local Block (%u/%u) conflicts with Global Block (%u/%u)\n",
- lower, upper, OspfSR.srgb.start, srgb_upper);
- return CMD_WARNING_CONFIG_FAILED;
- }
-
- if (update_sr_blocks(OspfSR.srgb.start, srgb_upper, lower, upper) < 0)
- return CMD_WARNING_CONFIG_FAILED;
- else
- return CMD_SUCCESS;
-}
-
-DEFUN_HIDDEN(no_sr_local_label_range, no_sr_local_label_range_cmd,
- "no segment-routing local-block [(16-1048575) (16-1048575)]",
- NO_STR SR_STR
- "Segment Routing Local Block label range\n"
- "Lower-bound range in decimal (16-1048575)\n"
- "Upper-bound range in decimal (16-1048575)\n")
-{
-
- uint32_t srgb_end;
-
- /* Validate SRLB against SRGB */
- srgb_end = OspfSR.srgb.start + OspfSR.srgb.size - 1;
- if (ranges_overlap(OspfSR.srgb.start, srgb_end, DEFAULT_SRLB_LABEL,
- DEFAULT_SRLB_END)) {
- vty_out(vty,
- "New SR Local Block (%u/%u) conflicts with Global Block (%u/%u)\n",
- DEFAULT_SRLB_LABEL, DEFAULT_SRLB_END, OspfSR.srgb.start,
- srgb_end);
- return CMD_WARNING_CONFIG_FAILED;
- }
-
- if (update_sr_blocks(OspfSR.srgb.start, srgb_end, DEFAULT_SRLB_LABEL,
- DEFAULT_SRLB_END)
- < 0)
- return CMD_WARNING_CONFIG_FAILED;
- else
- return CMD_SUCCESS;
-}
-
DEFUN (sr_node_msd,
sr_node_msd_cmd,
"segment-routing node-msd (1-16)",
@@ -3047,8 +2969,6 @@ void ospf_sr_register_vty(void)
install_element(OSPF_NODE, &no_ospf_sr_enable_cmd);
install_element(OSPF_NODE, &sr_global_label_range_cmd);
install_element(OSPF_NODE, &no_sr_global_label_range_cmd);
- install_element(OSPF_NODE, &sr_local_label_range_cmd);
- install_element(OSPF_NODE, &no_sr_local_label_range_cmd);
install_element(OSPF_NODE, &sr_node_msd_cmd);
install_element(OSPF_NODE, &no_sr_node_msd_cmd);
install_element(OSPF_NODE, &sr_prefix_sid_cmd);
diff --git a/tests/topotests/ospf_sr_te_topo1/rt1/ospfd.conf b/tests/topotests/ospf_sr_te_topo1/rt1/ospfd.conf
index a440fa6fd..064a4bf28 100644
--- a/tests/topotests/ospf_sr_te_topo1/rt1/ospfd.conf
+++ b/tests/topotests/ospf_sr_te_topo1/rt1/ospfd.conf
@@ -30,7 +30,6 @@ router ospf
passive-interface lo
segment-routing on
segment-routing global-block 16000 23999
- !segment-routing local-block 15000 15999
segment-routing node-msd 8
segment-routing prefix 1.1.1.1/32 index 10
!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt2/ospfd.conf b/tests/topotests/ospf_sr_te_topo1/rt2/ospfd.conf
index 7bec98cd7..65b20f0e6 100644
--- a/tests/topotests/ospf_sr_te_topo1/rt2/ospfd.conf
+++ b/tests/topotests/ospf_sr_te_topo1/rt2/ospfd.conf
@@ -41,7 +41,6 @@ router ospf
passive-interface lo
segment-routing on
segment-routing global-block 16000 23999
- !segment-routing local-block 15000 15999
segment-routing node-msd 8
segment-routing prefix 2.2.2.2/32 index 20
!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt3/ospfd.conf b/tests/topotests/ospf_sr_te_topo1/rt3/ospfd.conf
index 40b85c460..5be0c49a8 100644
--- a/tests/topotests/ospf_sr_te_topo1/rt3/ospfd.conf
+++ b/tests/topotests/ospf_sr_te_topo1/rt3/ospfd.conf
@@ -40,7 +40,6 @@ router ospf
router-info area 0.0.0.0
segment-routing on
segment-routing global-block 16000 23999
- !segment-routing local-block 15000 15999
segment-routing node-msd 8
segment-routing prefix 3.3.3.3/32 index 30
!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt4/ospfd.conf b/tests/topotests/ospf_sr_te_topo1/rt4/ospfd.conf
index 4d3380d10..7cdf032ea 100644
--- a/tests/topotests/ospf_sr_te_topo1/rt4/ospfd.conf
+++ b/tests/topotests/ospf_sr_te_topo1/rt4/ospfd.conf
@@ -47,7 +47,6 @@ router ospf
passive-interface lo
segment-routing on
segment-routing global-block 16000 23999
- !segment-routing local-block 15000 15999
segment-routing node-msd 8
segment-routing prefix 4.4.4.4/32 index 40
!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt5/ospfd.conf b/tests/topotests/ospf_sr_te_topo1/rt5/ospfd.conf
index b111ce588..8f71cda44 100644
--- a/tests/topotests/ospf_sr_te_topo1/rt5/ospfd.conf
+++ b/tests/topotests/ospf_sr_te_topo1/rt5/ospfd.conf
@@ -47,7 +47,6 @@ router ospf
passive-interface lo
segment-routing on
segment-routing global-block 16000 23999
-! segment-routing local-block 15000 15999
segment-routing node-msd 8
segment-routing prefix 5.5.5.5/32 index 50
!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt6/ospfd.conf b/tests/topotests/ospf_sr_te_topo1/rt6/ospfd.conf
index f0c5a9c0b..20c89757a 100644
--- a/tests/topotests/ospf_sr_te_topo1/rt6/ospfd.conf
+++ b/tests/topotests/ospf_sr_te_topo1/rt6/ospfd.conf
@@ -35,7 +35,6 @@ router ospf
passive-interface lo
segment-routing on
segment-routing global-block 16000 23999
-! segment-routing local-block 15000 15999
segment-routing node-msd 8
segment-routing prefix 6.6.6.6/32 index 60
!
diff --git a/tests/topotests/ospf_te_topo1/r4/ospfd.conf b/tests/topotests/ospf_te_topo1/r4/ospfd.conf
index e45467315..cd508017d 100644
--- a/tests/topotests/ospf_te_topo1/r4/ospfd.conf
+++ b/tests/topotests/ospf_te_topo1/r4/ospfd.conf
@@ -15,8 +15,7 @@ router ospf
mpls-te on
mpls-te router-address 10.0.255.4
segment-routing on
- segment-routing local-block 5000 5999
- segment-routing global-block 10000 19999
+ segment-routing global-block 10000 19999 local-block 5000 5999
segment-routing node-msd 12
segment-routing prefix 10.0.255.4/32 index 400 no-php-flag
!
diff --git a/tests/topotests/ospf_te_topo1/test_ospf_te_topo1.py b/tests/topotests/ospf_te_topo1/test_ospf_te_topo1.py
index 7de23dc34..699cdc905 100644
--- a/tests/topotests/ospf_te_topo1/test_ospf_te_topo1.py
+++ b/tests/topotests/ospf_te_topo1/test_ospf_te_topo1.py
@@ -224,7 +224,7 @@ def test_step4():
'vtysh -c "conf t" -c "router ospf" -c "segment-routing node-msd 16"'
)
tgen.net["r2"].cmd(
- 'vtysh -c "conf t" -c "router ospf" -c "segment-routing local-block 5000 6999"'
+ 'vtysh -c "conf t" -c "router ospf" -c "segment-routing global-block 16000 23999 local-block 5000 6999"'
)
tgen.net["r2"].cmd(
'vtysh -c "conf t" -c "router ospf" -c "segment-routing prefix 10.0.255.2/32 index 20 explicit-null"'