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

Felix Fietkau nbd at nbd.name
Mon May 24 23:58:54 PDT 2021


On 2021-05-24 15:35, 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 'br-lan'
> 	option type 'bridge'
> 	list ports 'lan1'
> 	list ports 'lan2'
> 
> config interface 'lan'
> 	option device 'br-lan'
> 	option proto 'static'
> 
> Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
I think the code for backwards compatibility would be a lot simpler if
you add both IFACE_ATTR_DEVICE and IFACE_ATTR_IFNAME and initialize
tb[IFACE_ATTR_DEVICE] to tb[IFACE_ATTR_IFNAME] if it's NULL.

- Felix



More information about the openwrt-devel mailing list