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

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

diff -u --recursive --new-file v2.1.26/linux/net/ipv4/ip_output.c linux/net/ipv4/ip_output.c
@@ -972,12 +972,16 @@
 	if (dev->family != AF_INET)
 		return NOTIFY_DONE;
 
-	if(event==NETDEV_UP) {
-/*
- *	Join the initial group if multicast.
- */		
+	if(event==NETDEV_UP) 
+	{
+		/*
+		 *	Join the initial group if multicast.
+		 */		
 		ip_mc_allhost(dev);
 	}
+	if(event==NETDEV_DOWN)
+		ip_mc_drop_device(dev);
+		
 	return ip_rt_event(event, dev);
 }
 

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