On 2021-05-24 15:35, Rafał Miłecki wrote:
> From: Rafał Miłecki <ra...@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 <ra...@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

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

Reply via email to