diff options
author | John W. Linville <linville@tuxdriver.com> | 2005-10-18 21:30:58 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-18 22:27:13 -0400 |
commit | df49898a47061e82219c991dfbe9ac6ddf7a866b (patch) | |
tree | 4f0c2445eb5ddb49c622a9d368a9773bd4fb0f7a | |
parent | 7645baec58b9661366e2038c4ea02bd06aaf1fbc (diff) |
[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>
-rw-r--r-- | drivers/net/bonding/bond_main.c | 10 |
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: | |||
4242 | } | 4242 | } |
4243 | 4243 | ||
4244 | static void bond_activebackup_xmit_copy(struct sk_buff *skb, | 4244 | static void bond_activebackup_xmit_copy(struct sk_buff *skb, |
4245 | struct bonding *bond, | 4245 | struct bonding *bond, |
4246 | struct slave *slave) | 4246 | struct slave *slave) |
4247 | { | 4247 | { |
4248 | struct sk_buff *skb2 = skb_copy(skb, GFP_ATOMIC); | 4248 | struct sk_buff *skb2 = skb_copy(skb, GFP_ATOMIC); |
4249 | struct ethhdr *eth_data; | 4249 | struct ethhdr *eth_data; |
@@ -4259,7 +4259,11 @@ static void bond_activebackup_xmit_copy(struct sk_buff *skb, | |||
4259 | skb2->mac.raw = (unsigned char *)skb2->data; | 4259 | skb2->mac.raw = (unsigned char *)skb2->data; |
4260 | eth_data = eth_hdr(skb2); | 4260 | eth_data = eth_hdr(skb2); |
4261 | 4261 | ||
4262 | /* Pick an appropriate source MAC address */ | 4262 | /* Pick an appropriate source MAC address |
4263 | * -- use slave's perm MAC addr, unless used by bond | ||
4264 | * -- otherwise, borrow active slave's perm MAC addr | ||
4265 | * since that will not be used | ||
4266 | */ | ||
4263 | hwaddr = slave->perm_hwaddr; | 4267 | hwaddr = slave->perm_hwaddr; |
4264 | if (!memcmp(eth_data->h_source, hwaddr, ETH_ALEN)) | 4268 | if (!memcmp(eth_data->h_source, hwaddr, ETH_ALEN)) |
4265 | hwaddr = bond->curr_active_slave->perm_hwaddr; | 4269 | hwaddr = bond->curr_active_slave->perm_hwaddr; |