mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
bonding: Improve IGMP join processing
In active-backup mode, the current bonding code duplicates IGMP traffic to all slaves, so that switches are up to date in case of a failover from an active to a backup interface. If bonding then fails back to the original active interface, it is likely that the "active slave" switch's IGMP forwarding for the port will be out of date until some event occurs to refresh the switch (e.g., a membership query). This patch alters the behavior of bonding to no longer flood IGMP to all ports, and to issue IGMP JOINs to the newly active port at the time of a failover. This insures that switches are kept up to date for all cases. "GOELLESCH Niels" <niels.goellesch@eurocontrol.int> originally reported this problem, and included a patch. His original patch was modified by Jay Vosburgh to additionally remove the existing IGMP flood behavior, use RCU, streamline code paths, fix trailing white space, and adjust for style. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
e245cb71d4
commit
a816c7c712
3 changed files with 50 additions and 51 deletions
|
@ -1250,6 +1250,28 @@ out:
|
|||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Resend IGMP JOIN report; used for bonding.
|
||||
*/
|
||||
void ip_mc_rejoin_group(struct ip_mc_list *im)
|
||||
{
|
||||
struct in_device *in_dev = im->interface;
|
||||
|
||||
#ifdef CONFIG_IP_MULTICAST
|
||||
if (im->multiaddr == IGMP_ALL_HOSTS)
|
||||
return;
|
||||
|
||||
if (IGMP_V1_SEEN(in_dev) || IGMP_V2_SEEN(in_dev)) {
|
||||
igmp_mod_timer(im, IGMP_Initial_Report_Delay);
|
||||
return;
|
||||
}
|
||||
/* else, v3 */
|
||||
im->crcount = in_dev->mr_qrv ? in_dev->mr_qrv :
|
||||
IGMP_Unsolicited_Report_Count;
|
||||
igmp_ifc_event(in_dev);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* A socket has left a multicast group on device dev
|
||||
*/
|
||||
|
@ -2596,3 +2618,4 @@ int __init igmp_mc_proc_init(void)
|
|||
EXPORT_SYMBOL(ip_mc_dec_group);
|
||||
EXPORT_SYMBOL(ip_mc_inc_group);
|
||||
EXPORT_SYMBOL(ip_mc_join_group);
|
||||
EXPORT_SYMBOL(ip_mc_rejoin_group);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue