[RFC PATCH v2 0/1] Introduce UCI support for configuring DSA VLAN filter rules
Felix Fietkau
nbd at nbd.name
Wed Jul 15 03:45:00 EDT 2020
Hi,
I would like to propose an alternative configuration format that is
structurally close to your proposal, but more generic in that it is not
tied to DSA directly but configures bridge vlans instead.
Here's the converted form of your example:
config device switch0
option name switch0
option type bridge
config bridge-vlan vlan1
option device switch0
option vlan 1
option ports 'lan1 lan2=t'
config bridge-vlan vlan2
option device switch0
option vlan 2
option ports wan
config bridge-vlan vlan5
option device switch0
option vlan 5
option ports 'lan2=pt lan3'
config bridge-vlan vlan8
option device switch0
option vlan 8
option ports 'lan2=t lan4'
config bridge-vlan vlan11
option device switch0
option vlan 11
option ports 'lan2=t lan4=t'
Changes:
- The device is created as a netifd bridge
- Bridge vlan sections should always refer to the bridge instead of
automatically be applied to the first one
- Use = instead of . to mark tagging modifiers. "." is already used
for vlan interface names and reusing it here creates ambiguity.
- Allow specifing pvid as a modifier instead of needing to create a
separate port section.
The section names are optional, I chose to put them in to make it easier
to modify the sections from scripts
What do you think?
- Felix
More information about the openwrt-devel
mailing list