]> git.baikalelectronics.ru Git - kernel.git/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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Jun 2018 20:47:10 +0000 (16:47 -0400)
commitaf83efbd85e9844dbbe87f4811236046768f1c32
treeea6824ba5019e0eb01ebdcd29e34e300aff0e3ab
parent9578197d18cec4a7af01a5ea996ab16f627e1787
bonding: re-evaluate force_primary when the primary slave name changes

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>
drivers/net/bonding/bond_options.c