lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20160307112905.GA2378@macbook.localdomain>
Date:	Mon, 7 Mar 2016 12:29:05 +0100
From:	Patrick McHardy <kaber@...sh.net>
To:	Nicholas Krause <xerofoify@...il.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] 8021q:Add missing statements to switch case in
 the function, register_vlan_device

On 06.03, Nicholas Krause wrote:
> This adds the proper snprintf and break statement for formatting
> the vlan_net structure pointer, vn's name using snprintf for if
> the switch case, VLAN_NAME_TYPE_PLUS_VID occurs for this particular
> switch statement inside the function, register_vlan_device.
> 
> Signed-off-by: Nicholas Krause <xerofoify@...il.com>
> ---
>  net/8021q/vlan.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
> index 59555f0..91ef50e 100644
> --- a/net/8021q/vlan.c
> +++ b/net/8021q/vlan.c
> @@ -246,8 +246,11 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id)
>  		/* Put our vlan.VID in the name.
>  		 * Name will look like:	 vlan0005
>  		 */
> +		snprintf(name, IFNAMSIZ, "%s%i", real_dev->name, vlan_id);
> +		break;

As the comment indicates, the fall-through is intended like this.

>  	default:
>  		snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id);
> +		break;
>  	}
>  
>  	new_dev = alloc_netdev(sizeof(struct vlan_dev_priv), name,
> -- 
> 2.1.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ