summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2005-10-19 03:30:58 +0200
committerJeff Garzik <jgarzik@pobox.com>2005-10-19 04:27:13 +0200
commitdf49898a47061e82219c991dfbe9ac6ddf7a866b (patch)
tree4f0c2445eb5ddb49c622a9d368a9773bd4fb0f7a /drivers/net/bonding
parent[PATCH] 8139too: fix resume for Realtek 8100B/8139D (diff)
downloadlinux-df49898a47061e82219c991dfbe9ac6ddf7a866b.tar.xz
linux-df49898a47061e82219c991dfbe9ac6ddf7a866b.zip
[PATCH] bonding: cleanup comment for mode 1 IGMP xmit hack
Expand comment explaining MAC address selection for replicated IGMP frames transmitted in bonding mode 1 (active-backup). Also, a small whitespace cleanup. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 58c4e36f87d7..8032126fd589 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4242,8 +4242,8 @@ out:
}
static void bond_activebackup_xmit_copy(struct sk_buff *skb,
- struct bonding *bond,
- struct slave *slave)
+ struct bonding *bond,
+ struct slave *slave)
{
struct sk_buff *skb2 = skb_copy(skb, GFP_ATOMIC);
struct ethhdr *eth_data;
@@ -4259,7 +4259,11 @@ static void bond_activebackup_xmit_copy(struct sk_buff *skb,
skb2->mac.raw = (unsigned char *)skb2->data;
eth_data = eth_hdr(skb2);
- /* Pick an appropriate source MAC address */
+ /* Pick an appropriate source MAC address
+ * -- use slave's perm MAC addr, unless used by bond
+ * -- otherwise, borrow active slave's perm MAC addr
+ * since that will not be used
+ */
hwaddr = slave->perm_hwaddr;
if (!memcmp(eth_data->h_source, hwaddr, ETH_ALEN))
hwaddr = bond->curr_active_slave->perm_hwaddr;