diff options
author | Jay Vosburgh <fubar@us.ibm.com> | 2007-02-28 20:03:37 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-06 06:08:11 -0500 |
commit | a816c7c712ff9f6770168b91facb9bfa9f0acd48 (patch) | |
tree | aa47edb0c1e23be76d0fff783b9665221f2a84ef /net/ipv4 | |
parent | e245cb71d490e5e516c0ca0688fad7de6c22943d (diff) |
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>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/igmp.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 063721302ebf..1c6a084b5fb7 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -1251,6 +1251,28 @@ out: | |||
1251 | } | 1251 | } |
1252 | 1252 | ||
1253 | /* | 1253 | /* |
1254 | * Resend IGMP JOIN report; used for bonding. | ||
1255 | */ | ||
1256 | void ip_mc_rejoin_group(struct ip_mc_list *im) | ||
1257 | { | ||
1258 | struct in_device *in_dev = im->interface; | ||
1259 | |||
1260 | #ifdef CONFIG_IP_MULTICAST | ||
1261 | if (im->multiaddr == IGMP_ALL_HOSTS) | ||
1262 | return; | ||
1263 | |||
1264 | if (IGMP_V1_SEEN(in_dev) || IGMP_V2_SEEN(in_dev)) { | ||
1265 | igmp_mod_timer(im, IGMP_Initial_Report_Delay); | ||
1266 | return; | ||
1267 | } | ||
1268 | /* else, v3 */ | ||
1269 | im->crcount = in_dev->mr_qrv ? in_dev->mr_qrv : | ||
1270 | IGMP_Unsolicited_Report_Count; | ||
1271 | igmp_ifc_event(in_dev); | ||
1272 | #endif | ||
1273 | } | ||
1274 | |||
1275 | /* | ||
1254 | * A socket has left a multicast group on device dev | 1276 | * A socket has left a multicast group on device dev |
1255 | */ | 1277 | */ |
1256 | 1278 | ||
@@ -2596,3 +2618,4 @@ int __init igmp_mc_proc_init(void) | |||
2596 | EXPORT_SYMBOL(ip_mc_dec_group); | 2618 | EXPORT_SYMBOL(ip_mc_dec_group); |
2597 | EXPORT_SYMBOL(ip_mc_inc_group); | 2619 | EXPORT_SYMBOL(ip_mc_inc_group); |
2598 | EXPORT_SYMBOL(ip_mc_join_group); | 2620 | EXPORT_SYMBOL(ip_mc_join_group); |
2621 | EXPORT_SYMBOL(ip_mc_rejoin_group); | ||