patch-2.1.27 linux/net/ipv4/igmp.c

Next file: linux/net/ipv4/ip_fw.c
Previous file: linux/net/ipv4/af_inet.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.26/linux/net/ipv4/igmp.c linux/net/ipv4/igmp.c
@@ -64,6 +64,7 @@
  *		Alexey Kuznetsov:	Wrong group leaving behaviour, backport
  *					fix from pending 2.1.x patches.
  *		Alan Cox:		Forget to enable FDDI support earlier.
+ *		Alexey Kuznetsov:	Fixed leaving groups on device down.
  */
 
 
@@ -553,12 +554,16 @@
 {
 	struct ip_mc_list *i;
 	struct ip_mc_list *j;
+	start_bh_atomic();
 	for(i=dev->ip_mc_list;i!=NULL;i=j)
 	{
 		j=i->next;
+		if(i->tm_running)
+			del_timer(&i->timer);
 		kfree_s(i,sizeof(*i));
 	}
 	dev->ip_mc_list=NULL;
+	end_bh_atomic();
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov