Skip to content

Commit

Permalink
[WIP] core/ap: dsa config: fix nasty roaming bug
Browse files Browse the repository at this point in the history
  • Loading branch information
spolack committed Feb 5, 2025
1 parent 29910e4 commit 6d25021
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion roles/cfg_openwrt/templates/common/config/dsa.network.inc
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
config device
option type 'bridge'
option name 'switch0'
option vlan_filtering '1'
option ports '{{ dsa_ports|join(' ') }}'

{% for network in networks | selectattr('vid', 'defined') | selectattr('ifname', 'undefined') %}
{% set portmapping = [] %}
{% for port in dsa_ports %}
{% set tagged = not network.get('untagged') %}
{{ portmapping.append(port|string + (":t" if tagged else "")) }}
{{ portmapping.append(port|string + (":t" if tagged else ":u*")) }}
{%- endfor %}

{% if libnetwork.isPortNeeded(network) | from_json %}
config device
option type '8021q'
option ifname 'switch0'
option vid '{{ network['vid'] }}'
option name 'switch0.{{ network['vid'] }}'
{% endif %}

config bridge-vlan 'vlan_{{ network['vid'] }}'
option device 'switch0'
option vlan '{{ network['vid'] }}'
Expand Down

0 comments on commit 6d25021

Please sign in to comment.