File tree 1 file changed +11
-1
lines changed
roles/cfg_openwrt/templates/common/config
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
config device
2
2
option type ' bridge'
3
3
option name ' switch0'
4
+ option vlan_filtering ' 1'
5
+ option ports ' {{ dsa_ports|join(' ' ) }}'
4
6
5
7
{% for network in networks | selectattr (' vid' , ' defined' ) | selectattr (' ifname' , ' undefined' ) % }
6
8
{% set portmapping = [] % }
7
9
{% for port in dsa_ports % }
8
10
{% set tagged = not network.get (' untagged' ) % }
9
- {{ portmapping.append (port| string + (" :t" if tagged else " " )) }}
11
+ {{ portmapping.append (port| string + (" :t" if tagged else " :u* " )) }}
10
12
{%- endfor % }
11
13
14
+ {% if libnetwork.isPortNeeded (network) | from_json % }
15
+ config device
16
+ option type ' 8021q'
17
+ option ifname ' switch0'
18
+ option vid ' {{ network[' vid' ] }}'
19
+ option name ' switch0.{{ network[' vid' ] }}'
20
+ {% endif % }
21
+
12
22
config bridge- vlan ' vlan_{{ network[' vid' ] }}'
13
23
option device ' switch0'
14
24
option vlan ' {{ network[' vid' ] }}'
You can’t perform that action at this time.
0 commit comments