diff -Nru a/include/linux/inetdevice.h b/include/linux/inetdevice.h --- a/include/linux/inetdevice.h Fri Apr 11 03:35:44 2003 +++ b/include/linux/inetdevice.h Thu Jan 29 20:57:46 2004 @@ -21,6 +21,7 @@ int medium_id; int no_xfrm; int no_policy; + int force_igmp_version; void *sysctl; }; diff -Nru a/net/ipv4/igmp.c b/net/ipv4/igmp.c --- a/net/ipv4/igmp.c Sat Jan 24 15:54:51 2004 +++ b/net/ipv4/igmp.c Mon Feb 2 21:43:31 2004 @@ -126,10 +126,14 @@ * contradict to specs provided this delay is small enough. */ -#define IGMP_V1_SEEN(in_dev) ((in_dev)->mr_v1_seen && \ - time_before(jiffies, (in_dev)->mr_v1_seen)) -#define IGMP_V2_SEEN(in_dev) ((in_dev)->mr_v2_seen && \ - time_before(jiffies, (in_dev)->mr_v2_seen)) +#define IGMP_V1_SEEN(in_dev) (ipv4_devconf.force_igmp_version == 1 || \ + (in_dev)->cnf.force_igmp_version == 1 || \ + ((in_dev)->mr_v1_seen && \ + time_before(jiffies, (in_dev)->mr_v1_seen))) +#define IGMP_V2_SEEN(in_dev) (ipv4_devconf.force_igmp_version == 2 || \ + (in_dev)->cnf.force_igmp_version == 2 || \ + ((in_dev)->mr_v2_seen && \ + time_before(jiffies, (in_dev)->mr_v2_seen))) static void igmpv3_add_delrec(struct in_device *in_dev, struct ip_mc_list *im); static void igmpv3_del_delrec(struct in_device *in_dev, __u32 multiaddr); @@ -1063,7 +1067,7 @@ reporter = im->reporter; igmp_stop_timer(im); - if (in_dev->dev->flags & IFF_UP) { + if (!in_dev->dead) { if (IGMP_V1_SEEN(in_dev)) goto done; if (IGMP_V2_SEEN(in_dev)) { @@ -1094,6 +1098,8 @@ if (im->multiaddr == IGMP_ALL_HOSTS) return; + if (in_dev->dead) + return; if (IGMP_V1_SEEN(in_dev) || IGMP_V2_SEEN(in_dev)) { spin_lock_bh(&im->lock); igmp_start_timer(im, IGMP_Initial_Report_Delay); @@ -1167,7 +1173,7 @@ igmpv3_del_delrec(in_dev, im->multiaddr); #endif igmp_group_added(im); - if (in_dev->dev->flags & IFF_UP) + if (!in_dev->dead) ip_rt_multicast_event(in_dev); out: return; @@ -1191,7 +1197,7 @@ write_unlock_bh(&in_dev->lock); igmp_group_dropped(i); - if (in_dev->dev->flags & IFF_UP) + if (!in_dev->dead) ip_rt_multicast_event(in_dev); ip_ma_put(i); @@ -1266,6 +1272,9 @@ struct ip_mc_list *i; ASSERT_RTNL(); + + /* Deactivate timers */ + ip_mc_down(in_dev); write_lock_bh(&in_dev->lock); while ((i = in_dev->mc_list) != NULL) {