linux/drivers/net/bonding
Flavio Leitner 42d782ac1b bonding: check if clients MAC addr has changed
When two systems using bonding devices in adaptive load
balancing (ALB) communicates with each other, an endless
ping-pong of ARP replies starts between these two systems.

What happens? In the ALB mode, bonding driver keeps track
of each client connected in a hash table, so it can do the
receive load balancing (RLB). This hash table is updated
when an ARP reply is received, then it scans for the client
entry, updates its MAC address and flag it to be announced
later. Therefore, two seconds later, the alb monitor runs
and send for each updated client entry two ARP replies
updating this specific client. The same process happens on
the receiving system, causing the endless ping-pong of arp
replies.

See more information including the relevant functions below:

   System 1                          System 2
    bond0                             bond0

   ping <system2>
    ARP request  --------->
                           <--------- ARP reply

+->rlb_arp_recv  <---------------------+   <--- loop begins
|  rlb_update_entry_from_arp           |
|  client_info->ntt = 1;               |
|  bond_info->rx_ntt = 1;              |
|                                      |
|         <communication succeed>      |
|                                      |
|  bond_alb_monitor                    |
|  rlb_update_rx_clients               |
|  rlb_update_client                   |
|  arp_create(ARPOP_REPLY)             |
|   send ARP reply -------------->     V
|   send ARP reply -------------->
|                               rlb_arp_recv
|                               rlb_update_entry_from_arp
|                               client_info->ntt = 1;
|                               bond_info->rx_ntt = 1;
|                           < snipped, same as in system 1>
+-------           <-------------- send ARP reply
                   <-------------- send ARP reply

Besides the unneeded networking traffic, this loop breaks
a cluster because a backup system can't take over the IP
address. There is always one system sending an ARP reply
poisoning the network.

This patch fixes the problem adding a check for the MAC
address before updating it. Thus, if the MAC address didn't
change, there is no need to update neither to announce it later.

Signed-off-by: Flavio Leitner <fleitner@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-30 13:51:11 -07:00
..
Makefile bonding: send IPv6 neighbor advertisement on failover 2008-11-06 00:49:37 -05:00
bond_3ad.c bond_3ad.c avoid possible null deref 2009-12-26 20:24:46 -08:00
bond_3ad.h Remove duplicate slow protocol define in bond_3ad.h 2009-05-09 13:15:49 -07:00
bond_alb.c bonding: check if clients MAC addr has changed 2010-06-30 13:51:11 -07:00
bond_alb.h Convert bonding timers to workqueues 2007-10-23 20:32:00 -04:00
bond_ipv6.c ipv6: convert idev_list to list macros 2010-03-20 15:45:09 -07:00
bond_main.c bonding: prevent netpoll over bonded interfaces 2010-06-28 23:54:10 -07:00
bond_sysfs.c driver-core: Add attribute argument to class_attribute show/store 2010-03-07 17:04:48 -08:00
bonding.h net: convert multicast list to list_head 2010-04-03 14:22:15 -07:00