summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-02-20 10:40:38 +0100
committerChristian Poessinger <christian@poessinger.com>2022-02-20 18:49:55 +0100
commitb693f929b63c0c847d9a3c6ee9160845ef501be1 (patch)
tree7791c4f4c546739669ffff268490393e7ac548d5 /data
parent3a1a7c40a13ee9f5561823a79876d88d3f5bf053 (diff)
downloadvyos-1x-b693f929b63c0c847d9a3c6ee9160845ef501be1.tar.gz
vyos-1x-b693f929b63c0c847d9a3c6ee9160845ef501be1.zip
static: T4203: obey interface dhcp default route distance
Commit 05aa22dc ("protocols: static: T3680: do not delete DHCP received routes") added a bug whenever a static route is modified - the DHCP interface will always end up with metric 210 - if there was a default route over a DHCP interface.
Diffstat (limited to 'data')
-rw-r--r--data/templates/frr/staticd.frr.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/templates/frr/staticd.frr.tmpl b/data/templates/frr/staticd.frr.tmpl
index bfe959c1d..5d833228a 100644
--- a/data/templates/frr/staticd.frr.tmpl
+++ b/data/templates/frr/staticd.frr.tmpl
@@ -17,10 +17,10 @@ vrf {{ vrf }}
{% endif %}
{# IPv4 default routes from DHCP interfaces #}
{% if dhcp is defined and dhcp is not none %}
-{% for interface in dhcp %}
+{% for interface, interface_config in dhcp.items() %}
{% set next_hop = interface | get_dhcp_router %}
{% if next_hop is defined and next_hop is not none %}
-{{ ip_prefix }} route 0.0.0.0/0 {{ next_hop }} {{ interface }} tag 210 210
+{{ ip_prefix }} route 0.0.0.0/0 {{ next_hop }} {{ interface }} tag 210 {{ interface_config.distance }}
{% endif %}
{% endfor %}
{% endif %}