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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52D42842.5010709@cogentembedded.com>
Date:	Mon, 13 Jan 2014 21:54:10 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Ding Tianhong <dingtianhong@...wei.com>,
	Jay Vosburgh <fubar@...ibm.com>,
	Veaceslav Falico <vfalico@...hat.com>,
	Eric Dumazet <edumazet@...gle.com>,
	"David S. Miller" <davem@...emloft.net>,
	Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net 2/2] bonding: rename the dev upper link if the master's,
 name changed

On 13-01-2014 17:08, Ding Tianhong wrote:

> The bond_maste_rename() will rename the links for slave dev's upper dev link,

    s/maste/master/.

> if faild, it will rollback and rename the new name to old name for slave dev.

    s/faild/failed/.

> Add a new parameter called name to save the old bonding name in struct bonding.

> Signed-off-by: Ding Tianhong <dingtianhong@...wei.com>
> ---
>   drivers/net/bonding/bond_main.c | 35 +++++++++++++++++++++++++++++++++++
>   drivers/net/bonding/bonding.h   |  1 +
>   2 files changed, 36 insertions(+)

> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 4b8c58b..8c044c0 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -2799,11 +2799,41 @@ re_arm:
>
>   /*-------------------------- netdev event handling --------------------------*/
>
> +static int bond_master_rename(struct bonding *bond)
> +{
> +	struct slave *slave;
> +	struct list_head *iter;
> +	char ori_linkname[IFNAMSIZ + 7], new_linkname[IFNAMSIZ + 7];

    Perhaps s/ori/old/ is better?

> +	int err = 0;
> +
> +	sprintf(ori_linkname, "upper_%s", bond->name);
> +	sprintf(new_linkname, "upper_%s", bond->dev->name);
> +
> +	bond_for_each_slave(bond, slave, iter) {
> +

    No need for this empty line, I think.

> +		err = netdev_upper_dev_rename(slave->dev, bond->dev, ori_linkname,
> +					new_linkname);

    The continuation line should start right under 'slave' on the broken up line.

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ