From: Jiri Pirko <jpirko@redhat.com> Date: Thu, 14 May 2009 12:15:58 +0200 Subject: [net] bonding: tlb/alb: set active slave when enslaving Message-id: 20090514101557.GL3517@psychotron.englab.brq.redhat.com O-Subject: [RHEL5.5 patch] BZ499884 net: bonding: select current active slave when enslaving device for mode tlb and alb Bugzilla: 499884 RH-Acked-by: Thomas Graf <tgraf@redhat.com> RH-Acked-by: Andy Gospodarek <gospo@redhat.com> BZ499884 https://bugzilla.redhat.com/show_bug.cgi?id=499884 Description: Although upstream fix focuses different issue it turned out it also fixes this bz. In tlb and alb modes, bonding has following problem. When the primary slave is set to some device and you remove this device from bonding interface and then add it back, this interface should be set as current active slave immediatelly (if it has the link). But it isn't. This patch follows the upstream behaviour and fixes the issue. Upstream: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5a29f7893fbe681f1334285be7e41e56f0de666c Brew: https://brewweb.devel.redhat.com/taskinfo?taskID=1797394 Test: Booted and tested on x86_64. Jirka Signed-off-by: Jiri Pirko <jpirko@redhat.com> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 06ce365..1693dfa 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1746,6 +1746,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) case BOND_MODE_ALB: new_slave->state = BOND_STATE_ACTIVE; bond_set_slave_inactive_flags(new_slave); + bond_select_active_slave(bond); break; default: dprintk("This slave is always active in trunk mode\n");