Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bonding: fix to rejoin multicast groups immediately

The IGMP specs states that if the system receives a
membership report, it shouldn't send another for the
next minute. However, if a link failure happens right
after that, the backup slave and the switch connected
to this slave will not know about the multicast and
the traffic will hang for about a minute.

This patch fixes it to rejoin multicast groups immediately
after a failover restoring the multicast traffic.

Signed-off-by: Flavio Leitner <fleitner@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Flavio Leitner and committed by
David S. Miller
e12b4539 5a37e8ca

+8 -8
+8 -8
net/ipv4/igmp.c
··· 1269 1269 if (im->multiaddr == IGMP_ALL_HOSTS) 1270 1270 return; 1271 1271 1272 - if (IGMP_V1_SEEN(in_dev) || IGMP_V2_SEEN(in_dev)) { 1273 - igmp_mod_timer(im, IGMP_Initial_Report_Delay); 1274 - return; 1275 - } 1276 - /* else, v3 */ 1277 - im->crcount = in_dev->mr_qrv ? in_dev->mr_qrv : 1278 - IGMP_Unsolicited_Report_Count; 1279 - igmp_ifc_event(in_dev); 1272 + /* a failover is happening and switches 1273 + * must be notified immediately */ 1274 + if (IGMP_V1_SEEN(in_dev)) 1275 + igmp_send_report(in_dev, im, IGMP_HOST_MEMBERSHIP_REPORT); 1276 + else if (IGMP_V2_SEEN(in_dev)) 1277 + igmp_send_report(in_dev, im, IGMPV2_HOST_MEMBERSHIP_REPORT); 1278 + else 1279 + igmp_send_report(in_dev, im, IGMPV3_HOST_MEMBERSHIP_REPORT); 1280 1280 #endif 1281 1281 } 1282 1282 EXPORT_SYMBOL(ip_mc_rejoin_group);