提交 d3da6831 编写于 作者: J Jasper Spaans 提交者: David S. Miller

bonding: Modify hash transmit policies to use the packet's source MAC address

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: NJasper Spaans <spaans@fox-it.com>
Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 66ed1e5e
......@@ -3665,10 +3665,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;
}
/*
......@@ -3695,7 +3695,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;
}
/*
......@@ -3706,7 +3706,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 ----------------------------*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册