bonding: handle slave's name change with primary_slave logic
bonding: handle slave's name change with primary_slave logic

Currently, if a slave's name change, we just pass it by. However, if the
slave is a current primary_slave, then we end up with using a slave, whose
name != params.primary, for primary_slave. And vice-versa, if we don't have
a primary_slave but have params.primary set - we will not detected a new
primary_slave.

Fix this by catching the NETDEV_CHANGENAME event and setting primary_slave
accordingly. Also, if the primary_slave was changed, issue a reselection of
the active slave, cause the priorities have changed.

Reported-by: Ding Tianhong <6319509b12a56ad4c8f781f7750eb8df2374d4fd@huawei.com>
CC: Ding Tianhong <6319509b12a56ad4c8f781f7750eb8df2374d4fd@huawei.com>
CC: Jay Vosburgh <9ab50f27d4201db9b28483ba83c48ebafbb2aa17@us.ibm.com>
CC: Andy Gospodarek <e3579b1e47f273529f0f929453e939a68ede9fd1@greyhouse.net>
Signed-off-by: Veaceslav Falico <13e4c2c2c15eff98ad47d02f3ccee2d83dc7015d@redhat.com>
Acked-by: Ding Tianhong <6319509b12a56ad4c8f781f7750eb8df2374d4fd@huawei.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs