diff mbox

bonding: use the correct size for _simple_hash()

Message ID 1298885668-3917-1-git-send-email-amwang@redhat.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Amerigo Wang Feb. 28, 2011, 9:34 a.m. UTC
Clearly it should be the size of ->ip_dst here.
Although this is harmless, but it still reads odd.

Signed-off-by: WANG Cong <amwang@redhat.com>

---
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Feb. 28, 2011, 9:21 p.m. UTC | #1
From: Amerigo Wang <amwang@redhat.com>
Date: Mon, 28 Feb 2011 17:34:28 +0800

> Clearly it should be the size of ->ip_dst here.
> Although this is harmless, but it still reads odd.
> 
> Signed-off-by: WANG Cong <amwang@redhat.com>

Applied to net-next-2.6, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index 5c6fba8..9bc5de3 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -604,7 +604,7 @@  static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
 
 	_lock_rx_hashtbl(bond);
 
-	hash_index = _simple_hash((u8 *)&arp->ip_dst, sizeof(arp->ip_src));
+	hash_index = _simple_hash((u8 *)&arp->ip_dst, sizeof(arp->ip_dst));
 	client_info = &(bond_info->rx_hashtbl[hash_index]);
 
 	if (client_info->assigned) {