[LEDE-DEV] [PATCH v2 netifd 1/3] device: Fix device find failure in avl list due to device name change

Conor O'Gorman i at conorogorman.net
Wed Jun 15 02:06:07 PDT 2016


On 06/06/16 13:58, Hans Dedecker wrote:
> diff --git a/vlan.c b/vlan.c
> index ac434ce..7f8697b 100644
> --- a/vlan.c
> +++ b/vlan.c
> @@ -63,8 +63,11 @@ static int vlan_set_device_state(struct device *dev, bool up)
>   
>   static void vlan_dev_set_name(struct vlan_device *vldev, struct device *dev)
>   {
> +	char name[IFNAMSIZ];
> +
>   	vldev->dev.hidden = dev->hidden;
> -	snprintf(vldev->dev.ifname, IFNAMSIZ, "%s.%d", dev->ifname, vldev->id);
> +	snprintf(name, IFNAMSIZ, "%s.%d", dev->ifname, vldev->id);
>
I'll be pedantic and mention that this is only one format for vlan 
device naming.
See VLAN_NAME_TYPE_*



More information about the Lede-dev mailing list