[PATCH netifd] interface: rename "ifname" attribute to "device"

Felix Fietkau nbd at nbd.name
Fri May 21 22:54:52 PDT 2021

On 2021-05-17 16:49, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal at milecki.pl>
> Interfaces need to be assigned to devices. For that purpose a "device"
> option should be more accurate than "ifname" one.
> For backward compatibility add a temporary config translation.
> Config example:
> config device
> 	option name 'lan'
> 	option type 'bridge'
> 	list ports 'lan1'
> 	list ports 'lan2'
> config interface 'home'
> 	option device 'lan'
> 	option proto 'static'
> Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
While I agree that the 'device' name would fit better than 'ifname',
the fallback config translation is not enough in this case.
netifd supports adding dynamic interfaces via ubus, where the config
data is provided as blobmsg. You could update the in-tree users of that,
but I don't know if there are any out-of-tree downstream users of this
functionality that you would be breaking with this change.

- Felix

More information about the openwrt-devel mailing list