|
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 = "">
+ .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)
mldsysctl.patch
Description: Binary data
|