ARP traffic passing through a bridge and out via the bond (when the bond is a 
port of the bridge) should not have its source MAC address adjusted by the 
receive load balance code in rlb_arp_xmit.

Signed-off-by: Zheng Li <zheng.x...@oracle.com>
Cc: Jay Vosburgh <fu...@us.ibm.com>
Cc: Andy Gospodarek <a...@greyhouse.net>
Cc: "David S. Miller" <da...@davemloft.net>

---
 drivers/net/bonding/bond_alb.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index e15cc11..641b3f1 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -700,7 +700,17 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, 
struct bonding *bond)
                */
                tx_slave = rlb_choose_channel(skb, bond);
                if (tx_slave) {
-                       memcpy(arp->mac_src,tx_slave->dev->dev_addr, ETH_ALEN);
+                       struct slave *tmp_slave = NULL;
+                       int i = 0;
+                       bond_for_each_slave(bond, tmp_slave, i) {
+                               if (ether_addr_equal_64bits(arp->mac_src,
+                                               tmp_slave->dev->dev_addr)) {
+                                       memcpy(arp->mac_src,
+                                               tx_slave->dev->dev_addr,
+                                               ETH_ALEN);
+                                       break;
+                               }
+                       }
                }
                pr_debug("Server sent ARP Reply packet\n");
        } else if (arp->op_code == htons(ARPOP_REQUEST)) {
-- 
1.7.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to