summaryrefslogtreecommitdiff
path: root/data/templates/frr/static_routes_macro.j2
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-03-03 20:23:09 +0100
committerChristian Poessinger <christian@poessinger.com>2022-03-03 20:23:09 +0100
commitbb78f3a9ad28f62896a536719783011794deb64c (patch)
tree8dfe129772c4ce94744f24c984e720bf94c98b6f /data/templates/frr/static_routes_macro.j2
parente3f86ce0d65fe8fe0c5eebebdfd3ab3723e2e539 (diff)
downloadvyos-1x-bb78f3a9ad28f62896a536719783011794deb64c.tar.gz
vyos-1x-bb78f3a9ad28f62896a536719783011794deb64c.zip
static: T4283: support "reject" routes - emit an ICMP unreachable when matched
Diffstat (limited to 'data/templates/frr/static_routes_macro.j2')
-rw-r--r--data/templates/frr/static_routes_macro.j23
1 files changed, 3 insertions, 0 deletions
diff --git a/data/templates/frr/static_routes_macro.j2 b/data/templates/frr/static_routes_macro.j2
index 86c7470ca..8359357b7 100644
--- a/data/templates/frr/static_routes_macro.j2
+++ b/data/templates/frr/static_routes_macro.j2
@@ -2,6 +2,9 @@
{% if prefix_config.blackhole is defined %}
{{ ip_ipv6 }} route {{ prefix }} blackhole {{ prefix_config.blackhole.distance if prefix_config.blackhole.distance is defined }} {{ 'tag ' + prefix_config.blackhole.tag if prefix_config.blackhole.tag is defined }} {{ 'table ' + table if table is defined and table is not none }}
{% endif %}
+{% if prefix_config.reject is defined %}
+{{ ip_ipv6 }} route {{ prefix }} reject {{ prefix_config.reject.distance if prefix_config.reject.distance is defined }} {{ 'tag ' + prefix_config.reject.tag if prefix_config.reject.tag is defined }} {{ 'table ' + table if table is defined and table is not none }}
+{% endif %}
{% if prefix_config.dhcp_interface is defined and prefix_config.dhcp_interface is not none %}
{% set next_hop = prefix_config.dhcp_interface | get_dhcp_router %}
{% if next_hop is defined and next_hop is not none %}