Hi,

On 2020-07-23 12:10, Jo-Philipp Wich wrote:
> yeah I forgot to elaborate that in my last mail. The problem of dynamic / not
> explicitly addressable wifi interface names in the network config remains.
> 
> The best solution I can think of is fixing the wifi ifnames using "option
> ifname" in the wifi-iface sections (which causes some very interesting effects
> in my tests when not applied to *all* wifi-ifaces) and then using those fixes
> names in /etc/config/network.
> 
> The other alternative I see would be a hypothetical new notation comparable to
> the existing alias notation that resolves ifnames to their actual values at
> runtime... something like "@wifi-network(ssid=foo)" but this is just a very
> vague idea I had from time to time throughout the last few years which never
> gained any traction.
I'm considering the following extensions to netifd:

1. Have VLAN devices on top of vlan-enabled bridges to define hotplug
ops where applicable, so LAN could be a plain VLAN interface switch0.1
instead of its own bridge.
2. With these wrapper hotplug ops, a default VLAN would be passed as
well, unless overwritten by other VLAN settings (see below)
3. In addition to option network, allow specifying option network-vlan
in the wifi-iface section and have it contain a list of VLANs +
modifiers (tagged/PVID).

For a simple default config, you could have this:

# network
config device
        option name switch0
        
config bridge-vlan
        option vlan 1
        option ports "lan1 lan2 lan3 lan4"

config interface lan
        option ifname switch0.1


# wireless

config wifi-iface
        option network lan


In this case, wlan0 would be added to switch0 and set to VLAN 1 untagged
by default.

If you want it on VLAN 10 tagged/PVID instead, you could do:
        option network-vlan "10:t*"


What do you think?

- Felix

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to