Browse Source

bird: Allow to explicitly activate L3-access on any interface.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm 5 years ago
parent
commit
e49abbfa97
1 changed files with 3 additions and 2 deletions
  1. 3 2
      bird/l3-access.conf

+ 3 - 2
bird/l3-access.conf

@@ -3,8 +3,9 @@
 #
 
 protocol direct l3_access {
-{%- for iface in salt['pillar.get']('nodes:' ~ grains['id'] ~ ':ifaces') %}
-  {%- if salt['ffho.re_search']('^vlan(3\d\d|29\d\d)$', iface) %}
+{%- for iface in salt['pillar.get']('nodes:' ~ grains['id'] ~ ':ifaces')|sort %}
+  {%- set config = salt['pillar.get']('nodes:' ~ grains['id'] ~ ':ifaces:' ~ iface) %}
+  {%- if salt['ffho.re_search']('^vlan(3\d\d|29\d\d)$', iface) or 'l3-access' in config.get ('_opts', []) %}
 	interface "{{ iface }}";
   {%- endif %}
 {%- endfor %}