Skip to content

Commit

Permalink
bonding: Modify hash transmit policies to use the packet's source MAC…
Browse files Browse the repository at this point in the history
… 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: 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>
  • Loading branch information
Jasper Spaans authored and David S. Miller committed Oct 24, 2009
1 parent 66ed1e5 commit d3da683
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand All @@ -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;
}

/*
Expand All @@ -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 ----------------------------*/
Expand Down

0 comments on commit d3da683

Please sign in to comment.