]> git.itanic.dy.fi Git - linux-stable/commit
bonding: re-evaluate force_primary when the primary slave name changes
authorXiangning Yu <yuxiangning@gmail.com>
Thu, 7 Jun 2018 05:39:59 +0000 (13:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Jun 2018 00:06:28 +0000 (08:06 +0800)
commit584b975af0d29c461920acb4d512f70b0bbe3661
treec929b0769147a3322391cb532fb498a98f8e3c9c
parent33445c07cd45541410fb4cabd08b10827764c07f
bonding: re-evaluate force_primary when the primary slave name changes

[ Upstream commit eb55bbf865d9979098c6a7a17cbdb41237ece951 ]

There is a timing issue under active-standy mode, when bond_enslave() is
called, bond->params.primary might not be initialized yet.

Any time the primary slave string changes, bond->force_primary should be
set to true to make sure the primary becomes the active slave.

Signed-off-by: Xiangning Yu <yuxiangning@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/bonding/bond_options.c