summaryrefslogtreecommitdiff
path: root/data/templates/frr/ldpd.frr.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-12-09 08:04:23 +0100
committerGitHub <noreply@github.com>2020-12-09 08:04:23 +0100
commit9f5f31ed15d6187694ecb29f51919151d9817ec4 (patch)
tree365ebd7eb15a670b5bc8ba3500a8906c20923995 /data/templates/frr/ldpd.frr.tmpl
parent3226fa1d44d637e1e710bbd3532dcd27e61d2a91 (diff)
parentf0543d5d28d500409b2d35abefd8df5d2c2504a6 (diff)
downloadvyos-1x-9f5f31ed15d6187694ecb29f51919151d9817ec4.tar.gz
vyos-1x-9f5f31ed15d6187694ecb29f51919151d9817ec4.zip
Merge pull request #639 from Cheeze-It/current
mpls-conf: T915: Add LDP import and export control
Diffstat (limited to 'data/templates/frr/ldpd.frr.tmpl')
-rw-r--r--data/templates/frr/ldpd.frr.tmpl68
1 files changed, 56 insertions, 12 deletions
diff --git a/data/templates/frr/ldpd.frr.tmpl b/data/templates/frr/ldpd.frr.tmpl
index 86342b3eb..81343671c 100644
--- a/data/templates/frr/ldpd.frr.tmpl
+++ b/data/templates/frr/ldpd.frr.tmpl
@@ -34,13 +34,11 @@ neighbor {{neighbors}} session holdtime {{ldp.neighbor[neighbors].session_holdti
{% 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 %}
+{% if ldp.allocation.ipv4 is defined %}
+{% if ldp.allocation.ipv4.access_list is defined %}
label local allocate for {{ ldp.allocation.ipv4.access_list }}
+{% endif %}
{% endif %}
-label local allocate host-routes
-{% endif %}
-label local allocate host-routes
{% else %}
label local allocate host-routes
{% endif %}
@@ -56,9 +54,33 @@ discovery hello interval {{ ldp.discovery.hello_ipv4_interval }}
{% if ldp.discovery.session_ipv4_holdtime is defined %}
session holdtime {{ ldp.discovery.session_ipv4_holdtime }}
{% endif %}
+{% if ldp.import is defined %}
+{% if ldp.import.ipv4 is defined %}
+{% if ldp.import.ipv4.import_filter is defined %}
+{% if ldp.import.ipv4.import_filter.filter_access_list is defined %}
+{% if ldp.import.ipv4.import_filter.neighbor_access_list is defined %}
+label remote accept for {{ ldp.import.ipv4.import_filter.filter_access_list }} from {{ ldp.import.ipv4.import_filter.neighbor_access_list }}
+{% else %}
+label remote accept for {{ ldp.import.ipv4.import_filter.filter_access_list }}
+{% endif %}
+{% endif %}
+{% endif %}
+{% endif %}
+{% endif %}
{% if ldp.export is defined %}
-{% if ldp.export.ipv4.explicit_null is defined %}
+{% if ldp.export.ipv4 is defined %}
+{% if ldp.export.ipv4.explicit_null is defined %}
label local advertise explicit-null
+{% endif %}
+{% if ldp.export.ipv4.export_filter is defined %}
+{% if ldp.export.ipv4.export_filter.filter_access_list is defined %}
+{% if ldp.export.ipv4.export_filter.neighbor_access_list is defined %}
+label local advertise for {{ ldp.export.ipv4.export_filter.filter_access_list }} to {{ ldp.export.ipv4.export_filter.neighbor_access_list }}
+{% else %}
+label local advertise for {{ ldp.export.ipv4.export_filter.filter_access_list }}
+{% endif %}
+{% endif %}
+{% endif %}
{% endif %}
{% endif %}
{% if ldp.targeted_neighbor is defined %}
@@ -88,13 +110,11 @@ no address-family ipv4
{% 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 %}
+{% if ldp.allocation.ipv6 is defined %}
+{% if ldp.allocation.ipv6.access_list6 is defined %}
label local allocate for {{ ldp.allocation.ipv6.access_list6 }}
+{% endif %}
{% endif %}
-label local allocate host-routes
-{% endif %}
-label local allocate host-routes
{% else %}
label local allocate host-routes
{% endif %}
@@ -110,9 +130,33 @@ discovery hello interval {{ ldp.discovery.hello_ipv6_interval }}
{% if ldp.discovery.session_ipv6_holdtime is defined %}
session holdtime {{ ldp.discovery.session_ipv6_holdtime }}
{% endif %}
+{% if ldp.import is defined %}
+{% if ldp.import.ipv6 is defined %}
+{% if ldp.import.ipv6.import_filter is defined %}
+{% if ldp.import.ipv6.import_filter.filter_access_list6 is defined %}
+{% if ldp.import.ipv6.import_filter.neighbor_access_list6 is defined %}
+label remote accept for {{ ldp.import.ipv6.import_filter.filter_access_list6 }} from {{ ldp.import.ipv6.import_filter.neighbor_access_list6 }}
+{% else %}
+label remote accept for {{ ldp.import.ipv6.import_filter.filter_access_list6 }}
+{% endif %}
+{% endif %}
+{% endif %}
+{% endif %}
+{% endif %}
{% if ldp.export is defined %}
-{% if ldp.export.ipv6.explicit_null is defined %}
+{% if ldp.export.ipv6 is defined %}
+{% if ldp.export.ipv6.explicit_null is defined %}
label local advertise explicit-null
+{% endif %}
+{% if ldp.export.ipv6.export_filter is defined %}
+{% if ldp.export.ipv6.export_filter.filter_access_list6 is defined %}
+{% if ldp.export.ipv6.export_filter.neighbor_access_list6 is defined %}
+label local advertise for {{ ldp.export.ipv6.export_filter.filter_access_list6 }} to {{ ldp.export.ipv6.export_filter.neighbor_access_list6 }}
+{% else %}
+label local advertise for {{ ldp.export.ipv6.export_filter.filter_access_list6 }}
+{% endif %}
+{% endif %}
+{% endif %}
{% endif %}
{% endif %}
{% if ldp.targeted_neighbor is defined %}