network_interfaces is working for my router

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
2021-06-04 17:14:30 +02:00
parent f1ac6f269b
commit f57b1f1b3e
4 changed files with 9 additions and 4 deletions

View File

@ -12,7 +12,7 @@ iface {{ interfaces[item.name] }} inet static
{% endfor %}
network {{ subnet_network }}
netmask {{ subnet_netmask }}
{% if item.gateway is defined %}
{% if item.gateway is defined and item.gateway not in (ips | ipv4) %}
gateway {{ item.gateway }}
{% endif %}
{% if item.metric is defined %}
@ -41,7 +41,7 @@ iface {{ interfaces[item.name] }} inet6 static
{% for ip in (ips | ipv6) %}
address {{ ip }}/64
{% endfor %}
{% if item.gateway_v6 is defined %}
{% if item.gateway_v6 is defined and item.gateway_v6 not in (ips | ipv6) %}
gateway {{ item.gateway_v6 }}
{% endif %}
accept_ra 0