Skip to content

Commit 6d25021

Browse files
committed
[WIP] core/ap: dsa config: fix nasty roaming bug
1 parent 29910e4 commit 6d25021

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

roles/cfg_openwrt/templates/common/config/dsa.network.inc

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
config device
22
option type 'bridge'
33
option name 'switch0'
4+
option vlan_filtering '1'
5+
option ports '{{ dsa_ports|join(' ') }}'
46

57
{% for network in networks | selectattr('vid', 'defined') | selectattr('ifname', 'undefined') %}
68
{% set portmapping = [] %}
79
{% for port in dsa_ports %}
810
{% 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*")) }}
1012
{%- endfor %}
1113

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+
1222
config bridge-vlan 'vlan_{{ network['vid'] }}'
1323
option device 'switch0'
1424
option vlan '{{ network['vid'] }}'

0 commit comments

Comments
 (0)