summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-12-06 21:04:56 +0100
committerGitHub <noreply@github.com>2020-12-06 21:04:56 +0100
commitb2ee69bbfb73f0195e8e29b12aca0cb18dc91c98 (patch)
treea61ab8232cbf17f5dd1f6e568c187a72d899c484
parente0831f39d8ec0c65dfb55e97dd1e8e98463504f0 (diff)
parentcd0597f04e29e17fe76013ba19581d9eaeea611c (diff)
downloadvyos-1x-b2ee69bbfb73f0195e8e29b12aca0cb18dc91c98.tar.gz
vyos-1x-b2ee69bbfb73f0195e8e29b12aca0cb18dc91c98.zip
Merge pull request #635 from Cheeze-It/current
mpls-conf: T915: Add LDP local label allocation control
-rw-r--r--data/templates/frr/ldpd.frr.tmpl20
-rw-r--r--interface-definitions/protocols-mpls.xml.in45
2 files changed, 65 insertions, 0 deletions
diff --git a/data/templates/frr/ldpd.frr.tmpl b/data/templates/frr/ldpd.frr.tmpl
index 280df41eb..86342b3eb 100644
--- a/data/templates/frr/ldpd.frr.tmpl
+++ b/data/templates/frr/ldpd.frr.tmpl
@@ -33,7 +33,17 @@ neighbor {{neighbors}} session holdtime {{ldp.neighbor[neighbors].session_holdti
{% if ldp.discovery is defined %}
{% if ldp.discovery.transport_ipv4_address is defined %}
address-family ipv4
+{% if ldp.allocation is defined %}
+{% if ldp.allocation.ipv4 is defined %}
+{% if ldp.allocation.ipv4.access_list is defined %}
+label local allocate for {{ ldp.allocation.ipv4.access_list }}
+{% endif %}
+label local allocate host-routes
+{% endif %}
label local allocate host-routes
+{% else %}
+label local allocate host-routes
+{% endif %}
{% if ldp.discovery.transport_ipv4_address is defined %}
discovery transport-address {{ ldp.discovery.transport_ipv4_address }}
{% endif %}
@@ -77,7 +87,17 @@ no address-family ipv4
{% if ldp.discovery is defined %}
{% if ldp.discovery.transport_ipv6_address is defined %}
address-family ipv6
+{% if ldp.allocation is defined %}
+{% if ldp.allocation.ipv6 is defined %}
+{% if ldp.allocation.ipv6.access_list6 is defined %}
+label local allocate for {{ ldp.allocation.ipv6.access_list6 }}
+{% endif %}
+label local allocate host-routes
+{% endif %}
label local allocate host-routes
+{% else %}
+label local allocate host-routes
+{% endif %}
{% if ldp.discovery.transport_ipv6_address is defined %}
discovery transport-address {{ ldp.discovery.transport_ipv6_address }}
{% endif %}
diff --git a/interface-definitions/protocols-mpls.xml.in b/interface-definitions/protocols-mpls.xml.in
index 16286f2c4..e91db12de 100644
--- a/interface-definitions/protocols-mpls.xml.in
+++ b/interface-definitions/protocols-mpls.xml.in
@@ -26,6 +26,51 @@
</constraint>
</properties>
</leafNode>
+ <node name="allocation">
+ <properties>
+ <help>Forwarding equivalence class (FEC) allocation from local routes</help>
+ </properties>
+ <children>
+ <node name="ipv4">
+ <properties>
+ <help>IPv4 routes</help>
+ </properties>
+ <children>
+ <leafNode name="access-list">
+ <properties>
+ <help>Access-list number</help>
+ <valueHelp>
+ <format>1-2699</format>
+ <description>Access list number</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-2699"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <node name="ipv6">
+ <properties>
+ <help>IPv6 routes</help>
+ </properties>
+ <children>
+ <leafNode name="access-list6">
+ <properties>
+ <help>Access-list6 number</help>
+ <valueHelp>
+ <format>1-2699</format>
+ <description>Access list number</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-2699"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
<tagNode name="neighbor">
<properties>
<help>LDP neighbor parameters</help>