[PATCH netifd] bridge: rename "ifname" attribute to "ports"
Perry
isprotejesvalkata at gmail.com
Sat May 15 13:39:07 PDT 2021
On 5/15/21 7:18 PM, Rafał Miłecki wrote:
> On 15.05.2021 11:09, Paul Oranje wrote:
>> Op 14 mei 2021, om 15:27 heeft Rafał Miłecki <zajec5 at gmail.com> het
>> volgende geschreven:
>>>
>>> From: Rafał Miłecki <rafal at milecki.pl>
>>>
>>> Bridge aggregates multiple ports so use a more accurate name ("ports").
>> Confusing that a logical network "interface" references something
>> physical like a "port".
>> One would expect that at least a level is modelled in between and that
>> a bridge in a "interface" config section can bridge several devices
>> (like plain devices/L2 bridges/VLANs/tunnel devices/...).
>> Assuming I fail to understand the model, what am I missing ?
>>
>>> For backward compatibility add a temporary config translation.
>>>
>>> Config example:
>>>
>>> config interface 'lan'
>>> option type 'bridge'
>>> list ports 'lan1'
>>> list ports 'lan2'>
> You're most likely confused by the old way of defining bridges that
> OpenWrt happens to use by default. It's the UCI "interface" section
> type that defines L2 and L3 at the same time.
>
> That said it's not something this patch is trying to address. What gets
> you confused I'm planning to rework during next days. The first step
> was:
> [PATCH] base-files: use "ports" array in board.json network for bridges
> https://patchwork.ozlabs.org/project/openwrt/patch/20210514092147.30666-1-zajec5@gmail.com/
>
>
> The new way of defining L2 in L3 /etc/config/netowrk uses "device" and
> "interface" sections. So that would be actually something like:
>
> config device
> option name 'lan'
> option type 'bridge'
> list ports 'lan1'
> list ports 'lan2'
>
> On top of that you could then have L3 specified, e.g.:
>
> config interface 'home'
> option ifname 'lan'
> option proto 'static'
> option ipaddr '192.168.1.1'
> option netmask '255.255.255.0'
>
> ("home" being logical name)
In this example, would a wireless wifi-iface have
option network 'lan' # bridge device name?
or
option network 'home' # logical name?
Since the wifi-iface is added as another port on a bride, then I would
say 'lan'. But on the other hand, a wifi-iface does not have to be
bridged to any physical ports. In this case, I would say 'home' is correct.
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list