diff options
author | Jasper Spaans <spaans@fox-it.com> | 2009-10-23 04:08:46 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-08 10:22:01 -0800 |
commit | 193fe66e59fd31d6046727d6fdb9a232ad4cbd46 (patch) | |
tree | d6fb54785b496167f1bce55181fecab9e39695c7 | |
parent | 5213d268ccd71d4e294650d83161cd93cfb6a21e (diff) | |
download | linux-stable-193fe66e59fd31d6046727d6fdb9a232ad4cbd46.tar.gz linux-stable-193fe66e59fd31d6046727d6fdb9a232ad4cbd46.tar.bz2 linux-stable-193fe66e59fd31d6046727d6fdb9a232ad4cbd46.zip |
bonding: Modify hash transmit policies to use the packet's source MAC address
[ Upstream commit d3da68310a2cf934c2ea8a99a519d8b1ccca4c56 ]
Modify bonding hash transmit policies to use the psource MAC address of
the packet instead of the MAC address configured for the bonding device.
The old sitation conflicts with the documentation.
Signed-off-by: Jasper Spaans <spaans@fox-it.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/net/bonding/bond_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 7029d5396757..bcd8df92dec7 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3707,10 +3707,10 @@ static int bond_xmit_hash_policy_l23(struct sk_buff *skb, if (skb->protocol == htons(ETH_P_IP)) { return ((ntohl(iph->saddr ^ iph->daddr) & 0xffff) ^ - (data->h_dest[5] ^ bond_dev->dev_addr[5])) % count; + (data->h_dest[5] ^ data->h_source[5])) % count; } - return (data->h_dest[5] ^ bond_dev->dev_addr[5]) % count; + return (data->h_dest[5] ^ data->h_source[5]) % count; } /* @@ -3737,7 +3737,7 @@ static int bond_xmit_hash_policy_l34(struct sk_buff *skb, } - return (data->h_dest[5] ^ bond_dev->dev_addr[5]) % count; + return (data->h_dest[5] ^ data->h_source[5]) % count; } /* @@ -3748,7 +3748,7 @@ static int bond_xmit_hash_policy_l2(struct sk_buff *skb, { struct ethhdr *data = (struct ethhdr *)skb->data; - return (data->h_dest[5] ^ bond_dev->dev_addr[5]) % count; + return (data->h_dest[5] ^ data->h_source[5]) % count; } /*-------------------------- Device entry points ----------------------------*/ |