]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
bonding: fail_over_mac should only affect AB mode at enslave and removal processing
authordingtianhong <dingtianhong@huawei.com>
Sat, 25 Jan 2014 05:00:29 +0000 (13:00 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Feb 2014 03:47:27 +0000 (19:47 -0800)
commit00503b6f702eaf23e7257d6287da72805d7d014c
treef4d12ca845d4ec20f7f27526e48ee7b9230b9940
parentb045d37bd68c20ca88123c2b363cac5e3dae815f
bonding: fail_over_mac should only affect AB mode at enslave and removal processing

According to bonding.txt, the fail_over_ma should only affect active-backup mode,
but I found that the fail_over_mac could be set to active or follow in all
modes, this will cause new slave could not be set to bond's MAC address at
enslave processing and restore its own MAC address at removal processing.

The correct way to fix the problem is that we should not add restrictions when
setting options, just need to modify the bond enslave and removal processing
to check the mode in addition to fail_over_mac when setting a slave's MAC during
enslavement. The change active slave processing already only calls the fail_over_mac
function when in active-backup mode.

Thanks for Jay's suggestion.

The patch also modify the pr_warning() to pr_warn().

Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: Veaceslav Falico <vfalico@redhat.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c