summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-08 08:26:02 +0200
committerChristian Poessinger <christian@poessinger.com>2021-06-08 08:26:02 +0200
commitbdba331cb0501cc2db6aeaa486d7763e184133ce (patch)
treeb1dd5f46e6dfecd6c0334c6fdb25f0956d132cae
parente69879df07e10ce421683f436a4b41410d8c6dcb (diff)
downloadvyos-1x-bdba331cb0501cc2db6aeaa486d7763e184133ce.tar.gz
vyos-1x-bdba331cb0501cc2db6aeaa486d7763e184133ce.zip
policy: T3605: add support to prefer IPv6 global next-hop address in route-map
-rw-r--r--data/templates/frr/policy.frr.tmpl3
-rw-r--r--interface-definitions/policy.xml.in6
2 files changed, 9 insertions, 0 deletions
diff --git a/data/templates/frr/policy.frr.tmpl b/data/templates/frr/policy.frr.tmpl
index 881afa21f..507ee2a14 100644
--- a/data/templates/frr/policy.frr.tmpl
+++ b/data/templates/frr/policy.frr.tmpl
@@ -262,6 +262,9 @@ route-map {{ route_map }} {{ rule_config.action }} {{ rule }}
{% if rule_config.set.ipv6_next_hop is defined and rule_config.set.ipv6_next_hop.local is defined and rule_config.set.ipv6_next_hop.local is not none %}
set ipv6 next-hop local {{ rule_config.set.ipv6_next_hop.local }}
{% endif %}
+{% if rule_config.set.ipv6_next_hop is defined and rule_config.set.ipv6_next_hop.prefer_global is defined %}
+ set ipv6 next-hop prefer-global
+{% endif %}
{% if rule_config.set.large_community is defined and rule_config.set.large_community is not none %}
set large-community {{ rule_config.set.large_community }}
{% endif %}
diff --git a/interface-definitions/policy.xml.in b/interface-definitions/policy.xml.in
index 1dba59312..195e074a3 100644
--- a/interface-definitions/policy.xml.in
+++ b/interface-definitions/policy.xml.in
@@ -1066,6 +1066,12 @@
</constraint>
</properties>
</leafNode>
+ <leafNode name="prefer-global">
+ <properties>
+ <help>Prefer global address as the nexthop</help>
+ <valueless/>
+ </properties>
+ </leafNode>
</children>
</node>
<leafNode name="large-community">