diff options
author | Cheeze_It <none@none.com> | 2020-11-04 12:25:53 -0700 |
---|---|---|
committer | Cheeze_It <none@none.com> | 2020-11-04 12:25:53 -0700 |
commit | e1174ad59d396d6e96fcbeb7b90bc5a164e3ad5c (patch) | |
tree | bec417b789d2e88cb1891f9cdb748979448b1961 /data/templates | |
parent | 620271eca13b3535472243f98bca766ed6ec19ed (diff) | |
download | vyos-1x-e1174ad59d396d6e96fcbeb7b90bc5a164e3ad5c.tar.gz vyos-1x-e1174ad59d396d6e96fcbeb7b90bc5a164e3ad5c.zip |
mpls-conf: T915: Add TTL security for static LDP neighbors
The commit has to do with the addition of TTL security for LDP neighbors. The code was 90% done by Viascheslav. I modified it a little bit to get it to properly work.
We added more parameters to the neighbors dynamic loop. Once this is merged then we should be able to add more for the dynamic neighbor statements.
The way that this works is to have either TTL disabled, or to add the amount of hops accepted for the neighbor.
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/frr/ldpd.frr.tmpl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/data/templates/frr/ldpd.frr.tmpl b/data/templates/frr/ldpd.frr.tmpl index 81a992165..3cdce8c70 100644 --- a/data/templates/frr/ldpd.frr.tmpl +++ b/data/templates/frr/ldpd.frr.tmpl @@ -9,9 +9,23 @@ router-id {{ router_id }} {% endif -%} {% for neighbor_id in old_ldp.neighbors -%} no neighbor {{neighbor_id}} password {{old_ldp.neighbors[neighbor_id].password}} +{% if 'ttl_security' is defined -%} +{% if 'disable' in old_ldp.neighbors[neighbor_id].ttl_security %} +no neighbor {{neighbor_id}} ttl-security disable +{% else -%} +no neighbor {{neighbor_id}} ttl-security hops {{old_ldp.neighbors[neighbor_id].ttl_security}} +{% endif -%} +{% endif -%} {% endfor -%} {% for neighbor_id in ldp.neighbors -%} neighbor {{neighbor_id}} password {{ldp.neighbors[neighbor_id].password}} +{% if 'ttl_security' is defined -%} +{% if 'disable' in ldp.neighbors[neighbor_id].ttl_security %} +neighbor {{neighbor_id}} ttl-security disable +{% else -%} +neighbor {{neighbor_id}} ttl-security hops {{ldp.neighbors[neighbor_id].ttl_security}} +{% endif -%} +{% endif -%} {% endfor -%} ! address-family ipv4 |