netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sysctl variable to force IGMP version [PATCH]
@ 2004-01-27 21:13 David Stevens
  2004-01-28 20:00 ` David S. Miller
  2004-02-13  4:50 ` Takashi Hibi
  0 siblings, 2 replies; 8+ messages in thread
From: David Stevens @ 2004-01-27 21:13 UTC (permalink / raw)
  To: davem, netdev


[-- Attachment #1.1: Type: text/plain, Size: 3740 bytes --]





Below is a patch that allows forcing of the IGMP version. The primary
use would be with an IGMP-snooping switch that doesn't grok IGMPv3
packet formats and when there are no IGMPv2 or IGMPv1 multicast
routers on the network. By forcing the IGMP reports to version 2 (or
version 1, for really old switches), Linux would send reports that the
switch can understand for multicast forwarding to the port.

                        +-DLS

in-line and attached, for whitespace issues.

diff -ruN linux-2.6.2-rc1/include/linux/inetdevice.h linux-2.6.2-rc1F2/include/linux/inetdevice.h
--- linux-2.6.2-rc1/include/linux/inetdevice.h  2004-01-08 22:59:45.000000000 -0800
+++ linux-2.6.2-rc1F2/include/linux/inetdevice.h      2004-01-23 14:55:52.000000000 -0800
@@ -21,6 +21,7 @@
      int   medium_id;
      int   no_xfrm;
      int   no_policy;
+     int   force_igmp_version;
      void  *sysctl;
 };

diff -ruN linux-2.6.2-rc1/include/linux/sysctl.h linux-2.6.2-rc1F2/include/linux/sysctl.h
--- linux-2.6.2-rc1/include/linux/sysctl.h      2004-01-21 14:03:34.000000000 -0800
+++ linux-2.6.2-rc1F2/include/linux/sysctl.h    2004-01-23 14:55:52.000000000 -0800
@@ -360,6 +360,7 @@
      NET_IPV4_CONF_MEDIUM_ID=14,
      NET_IPV4_CONF_NOXFRM=15,
      NET_IPV4_CONF_NOPOLICY=16,
+     NET_IPV4_CONF_FORCE_IGMP_VERSION=17,
 };

 /* /proc/sys/net/ipv4/netfilter */
diff -ruN linux-2.6.2-rc1/net/ipv4/devinet.c linux-2.6.2-rc1F2/net/ipv4/devinet.c
--- linux-2.6.2-rc1/net/ipv4/devinet.c    2004-01-21 14:03:35.000000000 -0800
+++ linux-2.6.2-rc1F2/net/ipv4/devinet.c  2004-01-26 16:34:31.000000000 -0800
@@ -1132,7 +1132,7 @@

 static struct devinet_sysctl_table {
      struct ctl_table_header *sysctl_header;
-     ctl_table         devinet_vars[17];
+     ctl_table         devinet_vars[18];
      ctl_table         devinet_dev[2];
      ctl_table         devinet_conf_dir[2];
      ctl_table         devinet_proto_dir[2];
@@ -1269,6 +1269,15 @@
                  .proc_handler     = &ipv4_doint_and_flush,
                  .strategy   = &ipv4_doint_and_flush_strategy,
            },
+           {
+                 .ctl_name   = NET_IPV4_CONF_FORCE_IGMP_VERSION,
+                 .procname   = "force_igmp_version",
+                 .data       = &ipv4_devconf.force_igmp_version,
+                 .maxlen           = sizeof(int),
+                 .mode       = 0644,
+                 .proc_handler     = &ipv4_doint_and_flush,
+                 .strategy   = &ipv4_doint_and_flush_strategy,
+           },
      },
      .devinet_dev = {
            {
diff -ruN linux-2.6.2-rc1/net/ipv4/igmp.c linux-2.6.2-rc1F2/net/ipv4/igmp.c
--- linux-2.6.2-rc1/net/ipv4/igmp.c 2004-01-21 14:03:35.000000000 -0800
+++ linux-2.6.2-rc1F2/net/ipv4/igmp.c     2004-01-26 17:18:28.000000000 -0800
@@ -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);

(See attached file: igmpsysctl.patch)

[-- Attachment #1.2: Type: text/html, Size: 3789 bytes --]

[-- Attachment #2: igmpsysctl.patch --]
[-- Type: application/octet-stream, Size: 2821 bytes --]

diff -ruN linux-2.6.2-rc1/include/linux/inetdevice.h linux-2.6.2-rc1F2/include/linux/inetdevice.h
--- linux-2.6.2-rc1/include/linux/inetdevice.h	2004-01-08 22:59:45.000000000 -0800
+++ linux-2.6.2-rc1F2/include/linux/inetdevice.h	2004-01-23 14:55:52.000000000 -0800
@@ -21,6 +21,7 @@
 	int	medium_id;
 	int	no_xfrm;
 	int	no_policy;
+	int	force_igmp_version;
 	void	*sysctl;
 };
 
diff -ruN linux-2.6.2-rc1/include/linux/sysctl.h linux-2.6.2-rc1F2/include/linux/sysctl.h
--- linux-2.6.2-rc1/include/linux/sysctl.h	2004-01-21 14:03:34.000000000 -0800
+++ linux-2.6.2-rc1F2/include/linux/sysctl.h	2004-01-23 14:55:52.000000000 -0800
@@ -360,6 +360,7 @@
 	NET_IPV4_CONF_MEDIUM_ID=14,
 	NET_IPV4_CONF_NOXFRM=15,
 	NET_IPV4_CONF_NOPOLICY=16,
+	NET_IPV4_CONF_FORCE_IGMP_VERSION=17,
 };
 
 /* /proc/sys/net/ipv4/netfilter */
diff -ruN linux-2.6.2-rc1/net/ipv4/devinet.c linux-2.6.2-rc1F2/net/ipv4/devinet.c
--- linux-2.6.2-rc1/net/ipv4/devinet.c	2004-01-21 14:03:35.000000000 -0800
+++ linux-2.6.2-rc1F2/net/ipv4/devinet.c	2004-01-26 16:34:31.000000000 -0800
@@ -1132,7 +1132,7 @@
 
 static struct devinet_sysctl_table {
 	struct ctl_table_header *sysctl_header;
-	ctl_table		devinet_vars[17];
+	ctl_table		devinet_vars[18];
 	ctl_table		devinet_dev[2];
 	ctl_table		devinet_conf_dir[2];
 	ctl_table		devinet_proto_dir[2];
@@ -1269,6 +1269,15 @@
 			.proc_handler	= &ipv4_doint_and_flush,
 			.strategy	= &ipv4_doint_and_flush_strategy,
 		},
+		{
+			.ctl_name	= NET_IPV4_CONF_FORCE_IGMP_VERSION,
+			.procname	= "force_igmp_version",
+			.data		= &ipv4_devconf.force_igmp_version,
+			.maxlen		= sizeof(int),
+			.mode		= 0644,
+			.proc_handler	= &ipv4_doint_and_flush,
+			.strategy	= &ipv4_doint_and_flush_strategy,
+		},
 	},
 	.devinet_dev = {
 		{
diff -ruN linux-2.6.2-rc1/net/ipv4/igmp.c linux-2.6.2-rc1F2/net/ipv4/igmp.c
--- linux-2.6.2-rc1/net/ipv4/igmp.c	2004-01-21 14:03:35.000000000 -0800
+++ linux-2.6.2-rc1F2/net/ipv4/igmp.c	2004-01-26 17:18:28.000000000 -0800
@@ -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);

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sysctl variable to force IGMP version [PATCH]
  2004-01-27 21:13 sysctl variable to force IGMP version [PATCH] David Stevens
@ 2004-01-28 20:00 ` David S. Miller
  2004-02-13  4:50 ` Takashi Hibi
  1 sibling, 0 replies; 8+ messages in thread
From: David S. Miller @ 2004-01-28 20:00 UTC (permalink / raw)
  To: David Stevens; +Cc: netdev

On Tue, 27 Jan 2004 14:13:41 -0700
David Stevens <dlstevens@us.ibm.com> wrote:

> Below is a patch that allows forcing of the IGMP version. The primary
> use would be with an IGMP-snooping switch that doesn't grok IGMPv3
> packet formats and when there are no IGMPv2 or IGMPv1 multicast
> routers on the network. By forcing the IGMP reports to version 2 (or
> version 1, for really old switches), Linux would send reports that the
> switch can understand for multicast forwarding to the port.

Perhaps some sanity to prevent values other than 1 or 2 from being
set?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sysctl variable to force IGMP version [PATCH]
  2004-01-27 21:13 sysctl variable to force IGMP version [PATCH] David Stevens
  2004-01-28 20:00 ` David S. Miller
@ 2004-02-13  4:50 ` Takashi Hibi
  2004-02-13 18:31   ` David Stevens
  1 sibling, 1 reply; 8+ messages in thread
From: Takashi Hibi @ 2004-02-13  4:50 UTC (permalink / raw)
  To: David Stevens, davem, netdev

On Tue, 27 Jan 2004 14:13:41 -0700
David Stevens <dlstevens@us.ibm.com> wrote:

> 
> Below is a patch that allows forcing of the IGMP version. The primary
> use would be with an IGMP-snooping switch that doesn't grok IGMPv3
> packet formats and when there are no IGMPv2 or IGMPv1 multicast
> routers on the network. By forcing the IGMP reports to version 2 (or
> version 1, for really old switches), Linux would send reports that the
> switch can understand for multicast forwarding to the port.
> 
>                         +-DLS

Do you have a plan to make a patch to force the MLD version?
I think it is also helpful.

Regards,
Takashi Hibi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sysctl variable to force IGMP version [PATCH]
  2004-02-13  4:50 ` Takashi Hibi
@ 2004-02-13 18:31   ` David Stevens
  2004-02-14  0:15     ` YOSHIFUJI Hideaki / 吉藤英明
  2004-02-14 13:10     ` Yuji Sekiya
  0 siblings, 2 replies; 8+ messages in thread
From: David Stevens @ 2004-02-13 18:31 UTC (permalink / raw)
  To: Takashi Hibi; +Cc: davem, netdev

[-- Attachment #1: Type: text/plain, Size: 639 bytes --]





Takashi-san,

> Do you have a plan to make a patch to force the MLD version?
> I think it is also helpful.

      I didn't plan on it. Forcing IGMPv2 is needed for some
switches that do IGMP snooping and don't understand IGMPv3, but
I'm not aware of any switches that do MLD snooping.
      I'd hope even the IGMP-forcing sysctl would be unneeded
within a couple years. It should be unnecessary already when a
multicast router using IGMPv2 is present.

      Do you have a particular need for it for MLDv1? It's an
easy patch, but if it doesn't solve any real problem, I'd say
it shouldn't be done.

                              +-DLS

[-- Attachment #2: Type: text/html, Size: 803 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sysctl variable to force IGMP version [PATCH]
  2004-02-13 18:31   ` David Stevens
@ 2004-02-14  0:15     ` YOSHIFUJI Hideaki / 吉藤英明
  2004-02-14 13:10     ` Yuji Sekiya
  1 sibling, 0 replies; 8+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-02-14  0:15 UTC (permalink / raw)
  To: dlstevens; +Cc: hibi665, davem, netdev

In article <OF530A0FD3.685C9BE8-ON88256E39.0064C761-88256E39.00658CC3@us.ibm.com> (at Fri, 13 Feb 2004 10:31:54 -0800), David Stevens <dlstevens@us.ibm.com> says:

> I'm not aware of any switches that do MLD snooping.

There ARE: e.g.
  CentreCOM 9800 series (Allied-telesis)
  GS4000 (Hitachi)

-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sysctl variable to force IGMP version [PATCH]
  2004-02-13 18:31   ` David Stevens
  2004-02-14  0:15     ` YOSHIFUJI Hideaki / 吉藤英明
@ 2004-02-14 13:10     ` Yuji Sekiya
  2004-02-17  5:14       ` sysctl variable to force MLD " David Stevens
  1 sibling, 1 reply; 8+ messages in thread
From: Yuji Sekiya @ 2004-02-14 13:10 UTC (permalink / raw)
  To: David Stevens; +Cc: Takashi Hibi, davem, netdev

At Fri, 13 Feb 2004 10:31:54 -0800,
David Stevens <dlstevens@us.ibm.com> wrote:

> I didn't plan on it. Forcing IGMPv2 is needed for some
> switches that do IGMP snooping and don't understand IGMPv3, but
> I'm not aware of any switches that do MLD snooping.

Cisco Catalyst 6500 with 720 Supervisor module does.

-- Yuji Sekiya

^ permalink raw reply	[flat|nested] 8+ messages in thread

* sysctl variable to force MLD version [PATCH]
  2004-02-14 13:10     ` Yuji Sekiya
@ 2004-02-17  5:14       ` David Stevens
  2004-02-17  6:52         ` David S. Miller
  0 siblings, 1 reply; 8+ messages in thread
From: David Stevens @ 2004-02-17  5:14 UTC (permalink / raw)
  To: Yuji Sekiya; +Cc: davem, Takashi Hibi, netdev


[-- Attachment #1.1: Type: text/plain, Size: 4097 bytes --]





Dave,
      Below is a patch for 2.6.2 that adds a sysctl variable
to force the MLD version to version 1, for MLD-snooping switches
that don't understand version 2 packet formats.
      I'll do a 2.4 version of the patch soon.

                              +-DLS

diff -ruN linux-2.6.2/include/linux/ipv6.h linux-2.6.2F3/include/linux/ipv6.h
--- linux-2.6.2/include/linux/ipv6.h      2004-02-03 19:44:05.000000000 -0800
+++ linux-2.6.2F3/include/linux/ipv6.h    2004-02-16 17:35:44.000000000 -0800
@@ -136,6 +136,7 @@
      __s32       rtr_solicits;
      __s32       rtr_solicit_interval;
      __s32       rtr_solicit_delay;
+     __s32       force_mld_version;
 #ifdef CONFIG_IPV6_PRIVACY
      __s32       use_tempaddr;
      __s32       temp_valid_lft;
@@ -165,6 +166,7 @@
      DEVCONF_REGEN_MAX_RETRY,
      DEVCONF_MAX_DESYNC_FACTOR,
      DEVCONF_MAX_ADDRESSES,
+     DEVCONF_FORCE_MLD_VERSION,
      DEVCONF_MAX
 };

diff -ruN linux-2.6.2/include/linux/sysctl.h linux-2.6.2F3/include/linux/sysctl.h
--- linux-2.6.2/include/linux/sysctl.h    2004-02-03 19:43:56.000000000 -0800
+++ linux-2.6.2F3/include/linux/sysctl.h  2004-02-16 17:14:30.000000000 -0800
@@ -421,7 +421,8 @@
      NET_IPV6_TEMP_PREFERED_LFT=13,
      NET_IPV6_REGEN_MAX_RETRY=14,
      NET_IPV6_MAX_DESYNC_FACTOR=15,
-     NET_IPV6_MAX_ADDRESSES=16
+     NET_IPV6_MAX_ADDRESSES=16,
+     NET_IPV6_FORCE_MLD_VERSION=17
 };

 /* /proc/sys/net/ipv6/icmp */
diff -ruN linux-2.6.2/net/ipv6/addrconf.c linux-2.6.2F3/net/ipv6/addrconf.c
--- linux-2.6.2/net/ipv6/addrconf.c 2004-02-03 19:44:43.000000000 -0800
+++ linux-2.6.2F3/net/ipv6/addrconf.c     2004-02-16 19:51:08.000000000 -0800
@@ -149,6 +149,7 @@
      .accept_ra        = 1,
      .accept_redirects = 1,
      .autoconf         = 1,
+     .force_mld_version      = 0,
      .dad_transmits          = 1,
      .rtr_solicits           = MAX_RTR_SOLICITATIONS,
      .rtr_solicit_interval   = RTR_SOLICITATION_INTERVAL,
@@ -2739,6 +2740,7 @@
      array[DEVCONF_RTR_SOLICITS] = cnf->rtr_solicits;
      array[DEVCONF_RTR_SOLICIT_INTERVAL] = cnf->rtr_solicit_interval;
      array[DEVCONF_RTR_SOLICIT_DELAY] = cnf->rtr_solicit_delay;
+     array[DEVCONF_FORCE_MLD_VERSION] = cnf->force_mld_version;
 #ifdef CONFIG_IPV6_PRIVACY
      array[DEVCONF_USE_TEMPADDR] = cnf->use_tempaddr;
      array[DEVCONF_TEMP_VALID_LFT] = cnf->temp_valid_lft;
@@ -3042,7 +3044,7 @@
 static struct addrconf_sysctl_table
 {
      struct ctl_table_header *sysctl_header;
-     ctl_table addrconf_vars[17];
+     ctl_table addrconf_vars[18];
      ctl_table addrconf_dev[2];
      ctl_table addrconf_conf_dir[2];
      ctl_table addrconf_proto_dir[2];
@@ -3133,6 +3135,14 @@
                  .proc_handler     =     &proc_dointvec_jiffies,
                  .strategy   =     &sysctl_jiffies,
            },
+           {
+                 .ctl_name   =     NET_IPV6_FORCE_MLD_VERSION,
+                 .procname   =     "force_mld_version",
+                 .data       =     &ipv6_devconf.force_mld_version,
+                 .maxlen           =     sizeof(int),
+                 .mode       =     0644,
+                 .proc_handler     =     &proc_dointvec,
+           },
 #ifdef CONFIG_IPV6_PRIVACY
            {
                  .ctl_name   =     NET_IPV6_USE_TEMPADDR,
diff -ruN linux-2.6.2/net/ipv6/mcast.c linux-2.6.2F3/net/ipv6/mcast.c
--- linux-2.6.2/net/ipv6/mcast.c    2004-02-03 19:44:28.000000000 -0800
+++ linux-2.6.2F3/net/ipv6/mcast.c  2004-02-16 20:11:30.000000000 -0800
@@ -152,8 +152,10 @@
 #define IGMP6_UNSOLICITED_IVAL     (10*HZ)
 #define MLD_QRV_DEFAULT            2

-#define MLD_V1_SEEN(idev) ((idev)->mc_v1_seen && \
-           time_before(jiffies, (idev)->mc_v1_seen))
+#define MLD_V1_SEEN(idev) (ipv6_devconf.force_mld_version == 1 || \
+           (idev)->cnf.force_mld_version == 1 || \
+           ((idev)->mc_v1_seen && \
+           time_before(jiffies, (idev)->mc_v1_seen)))

 #define MLDV2_MASK(value, nb) ((nb)>=32 ? (value) : ((1<<(nb))-1) & (value))
 #define MLDV2_EXP(thresh, nbmant, nbexp, value) \

(See attached file: mldsysctl.patch)

[-- Attachment #1.2: Type: text/html, Size: 4253 bytes --]

[-- Attachment #2: mldsysctl.patch --]
[-- Type: application/octet-stream, Size: 3305 bytes --]

diff -ruN linux-2.6.2/include/linux/ipv6.h linux-2.6.2F3/include/linux/ipv6.h
--- linux-2.6.2/include/linux/ipv6.h	2004-02-03 19:44:05.000000000 -0800
+++ linux-2.6.2F3/include/linux/ipv6.h	2004-02-16 17:35:44.000000000 -0800
@@ -136,6 +136,7 @@
 	__s32		rtr_solicits;
 	__s32		rtr_solicit_interval;
 	__s32		rtr_solicit_delay;
+	__s32		force_mld_version;
 #ifdef CONFIG_IPV6_PRIVACY
 	__s32		use_tempaddr;
 	__s32		temp_valid_lft;
@@ -165,6 +166,7 @@
 	DEVCONF_REGEN_MAX_RETRY,
 	DEVCONF_MAX_DESYNC_FACTOR,
 	DEVCONF_MAX_ADDRESSES,
+	DEVCONF_FORCE_MLD_VERSION,
 	DEVCONF_MAX
 };
 
diff -ruN linux-2.6.2/include/linux/sysctl.h linux-2.6.2F3/include/linux/sysctl.h
--- linux-2.6.2/include/linux/sysctl.h	2004-02-03 19:43:56.000000000 -0800
+++ linux-2.6.2F3/include/linux/sysctl.h	2004-02-16 17:14:30.000000000 -0800
@@ -421,7 +421,8 @@
 	NET_IPV6_TEMP_PREFERED_LFT=13,
 	NET_IPV6_REGEN_MAX_RETRY=14,
 	NET_IPV6_MAX_DESYNC_FACTOR=15,
-	NET_IPV6_MAX_ADDRESSES=16
+	NET_IPV6_MAX_ADDRESSES=16,
+	NET_IPV6_FORCE_MLD_VERSION=17
 };
 
 /* /proc/sys/net/ipv6/icmp */
diff -ruN linux-2.6.2/net/ipv6/addrconf.c linux-2.6.2F3/net/ipv6/addrconf.c
--- linux-2.6.2/net/ipv6/addrconf.c	2004-02-03 19:44:43.000000000 -0800
+++ linux-2.6.2F3/net/ipv6/addrconf.c	2004-02-16 19:51:08.000000000 -0800
@@ -149,6 +149,7 @@
 	.accept_ra		= 1,
 	.accept_redirects	= 1,
 	.autoconf		= 1,
+	.force_mld_version	= 0,
 	.dad_transmits		= 1,
 	.rtr_solicits		= MAX_RTR_SOLICITATIONS,
 	.rtr_solicit_interval	= RTR_SOLICITATION_INTERVAL,
@@ -2739,6 +2740,7 @@
 	array[DEVCONF_RTR_SOLICITS] = cnf->rtr_solicits;
 	array[DEVCONF_RTR_SOLICIT_INTERVAL] = cnf->rtr_solicit_interval;
 	array[DEVCONF_RTR_SOLICIT_DELAY] = cnf->rtr_solicit_delay;
+	array[DEVCONF_FORCE_MLD_VERSION] = cnf->force_mld_version;
 #ifdef CONFIG_IPV6_PRIVACY
 	array[DEVCONF_USE_TEMPADDR] = cnf->use_tempaddr;
 	array[DEVCONF_TEMP_VALID_LFT] = cnf->temp_valid_lft;
@@ -3042,7 +3044,7 @@
 static struct addrconf_sysctl_table
 {
 	struct ctl_table_header *sysctl_header;
-	ctl_table addrconf_vars[17];
+	ctl_table addrconf_vars[18];
 	ctl_table addrconf_dev[2];
 	ctl_table addrconf_conf_dir[2];
 	ctl_table addrconf_proto_dir[2];
@@ -3133,6 +3135,14 @@
          		.proc_handler	=	&proc_dointvec_jiffies,
 			.strategy	=	&sysctl_jiffies,
 		},
+		{
+			.ctl_name	=	NET_IPV6_FORCE_MLD_VERSION,
+			.procname	=	"force_mld_version",
+         		.data		=	&ipv6_devconf.force_mld_version,
+			.maxlen		=	sizeof(int),
+			.mode		=	0644,
+         		.proc_handler	=	&proc_dointvec,
+		},
 #ifdef CONFIG_IPV6_PRIVACY
 		{
 			.ctl_name	=	NET_IPV6_USE_TEMPADDR,
diff -ruN linux-2.6.2/net/ipv6/mcast.c linux-2.6.2F3/net/ipv6/mcast.c
--- linux-2.6.2/net/ipv6/mcast.c	2004-02-03 19:44:28.000000000 -0800
+++ linux-2.6.2F3/net/ipv6/mcast.c	2004-02-16 20:11:30.000000000 -0800
@@ -152,8 +152,10 @@
 #define IGMP6_UNSOLICITED_IVAL	(10*HZ)
 #define MLD_QRV_DEFAULT		2
 
-#define MLD_V1_SEEN(idev) ((idev)->mc_v1_seen && \
-		time_before(jiffies, (idev)->mc_v1_seen))
+#define MLD_V1_SEEN(idev) (ipv6_devconf.force_mld_version == 1 || \
+		(idev)->cnf.force_mld_version == 1 || \
+		((idev)->mc_v1_seen && \
+		time_before(jiffies, (idev)->mc_v1_seen)))
 
 #define MLDV2_MASK(value, nb) ((nb)>=32 ? (value) : ((1<<(nb))-1) & (value))
 #define MLDV2_EXP(thresh, nbmant, nbexp, value) \

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sysctl variable to force MLD version [PATCH]
  2004-02-17  5:14       ` sysctl variable to force MLD " David Stevens
@ 2004-02-17  6:52         ` David S. Miller
  0 siblings, 0 replies; 8+ messages in thread
From: David S. Miller @ 2004-02-17  6:52 UTC (permalink / raw)
  To: David Stevens; +Cc: sekiya, hibi665, netdev

On Mon, 16 Feb 2004 22:14:09 -0700
David Stevens <dlstevens@us.ibm.com> wrote:

>       Below is a patch for 2.6.2 that adds a sysctl variable
> to force the MLD version to version 1, for MLD-snooping switches
> that don't understand version 2 packet formats.

Queued up for 2.6.4, thanks David.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-02-17  6:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-27 21:13 sysctl variable to force IGMP version [PATCH] David Stevens
2004-01-28 20:00 ` David S. Miller
2004-02-13  4:50 ` Takashi Hibi
2004-02-13 18:31   ` David Stevens
2004-02-14  0:15     ` YOSHIFUJI Hideaki / 吉藤英明
2004-02-14 13:10     ` Yuji Sekiya
2004-02-17  5:14       ` sysctl variable to force MLD " David Stevens
2004-02-17  6:52         ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).