aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorHannes Frederic Sowa <hannes@stressinduktion.org>2013-08-13 19:03:46 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-13 20:05:04 -0400
commitfc4eba58b4c1462ff3d6247b66fb47d6928db6d2 (patch)
tree94f3e5c02dc7d27c1a851e8c9368081c47d6d38c /net/ipv6/addrconf.c
parent74c181d528bd8b5989f424a489262d0742ca31ae (diff)
ipv6: make unsolicited report intervals configurable for mld
Commit cab70040dfd95ee32144f02fade64f0cb94f31a0 ("net: igmp: Reduce Unsolicited report interval to 1s when using IGMPv3") and 2690048c01f32bf45d1c1e1ab3079bc10ad2aea7 ("net: igmp: Allow user-space configuration of igmp unsolicited report interval") by William Manley made igmp unsolicited report intervals configurable per interface and corrected the interval of unsolicited igmpv3 report messages resendings to 1s. Same needs to be done for IPv6: MLDv1 (RFC2710 7.10.): 10 seconds MLDv2 (RFC3810 9.11.): 1 second Both intervals are configurable via new procfs knobs mldv1_unsolicited_report_interval and mldv2_unsolicited_report_interval. (also added .force_mld_version to ipv6_devconf_dflt to bring structs in line without semantic changes) v2: a) Joined documentation update for IPv4 and IPv6 MLD/IGMP unsolicited_report_interval procfs knobs. b) incorporate stylistic feedback from William Manley v3: a) add new DEVCONF_* values to the end of the enum (thanks to David Miller) Cc: Cong Wang <xiyou.wangcong@gmail.com> Cc: William Manley <william.manley@youview.com> Cc: Benjamin LaHaise <bcrl@kvack.org> Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 7fd8572bac80..ad12f7c43f25 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -177,6 +177,8 @@ static struct ipv6_devconf ipv6_devconf __read_mostly = {
177 .accept_redirects = 1, 177 .accept_redirects = 1,
178 .autoconf = 1, 178 .autoconf = 1,
179 .force_mld_version = 0, 179 .force_mld_version = 0,
180 .mldv1_unsolicited_report_interval = 10 * HZ,
181 .mldv2_unsolicited_report_interval = HZ,
180 .dad_transmits = 1, 182 .dad_transmits = 1,
181 .rtr_solicits = MAX_RTR_SOLICITATIONS, 183 .rtr_solicits = MAX_RTR_SOLICITATIONS,
182 .rtr_solicit_interval = RTR_SOLICITATION_INTERVAL, 184 .rtr_solicit_interval = RTR_SOLICITATION_INTERVAL,
@@ -211,6 +213,9 @@ static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = {
211 .accept_ra = 1, 213 .accept_ra = 1,
212 .accept_redirects = 1, 214 .accept_redirects = 1,
213 .autoconf = 1, 215 .autoconf = 1,
216 .force_mld_version = 0,
217 .mldv1_unsolicited_report_interval = 10 * HZ,
218 .mldv2_unsolicited_report_interval = HZ,
214 .dad_transmits = 1, 219 .dad_transmits = 1,
215 .rtr_solicits = MAX_RTR_SOLICITATIONS, 220 .rtr_solicits = MAX_RTR_SOLICITATIONS,
216 .rtr_solicit_interval = RTR_SOLICITATION_INTERVAL, 221 .rtr_solicit_interval = RTR_SOLICITATION_INTERVAL,
@@ -4179,6 +4184,10 @@ static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
4179 array[DEVCONF_RTR_SOLICIT_DELAY] = 4184 array[DEVCONF_RTR_SOLICIT_DELAY] =
4180 jiffies_to_msecs(cnf->rtr_solicit_delay); 4185 jiffies_to_msecs(cnf->rtr_solicit_delay);
4181 array[DEVCONF_FORCE_MLD_VERSION] = cnf->force_mld_version; 4186 array[DEVCONF_FORCE_MLD_VERSION] = cnf->force_mld_version;
4187 array[DEVCONF_MLDV1_UNSOLICITED_REPORT_INTERVAL] =
4188 jiffies_to_msecs(cnf->mldv1_unsolicited_report_interval);
4189 array[DEVCONF_MLDV2_UNSOLICITED_REPORT_INTERVAL] =
4190 jiffies_to_msecs(cnf->mldv2_unsolicited_report_interval);
4182#ifdef CONFIG_IPV6_PRIVACY 4191#ifdef CONFIG_IPV6_PRIVACY
4183 array[DEVCONF_USE_TEMPADDR] = cnf->use_tempaddr; 4192 array[DEVCONF_USE_TEMPADDR] = cnf->use_tempaddr;
4184 array[DEVCONF_TEMP_VALID_LFT] = cnf->temp_valid_lft; 4193 array[DEVCONF_TEMP_VALID_LFT] = cnf->temp_valid_lft;
@@ -4862,6 +4871,22 @@ static struct addrconf_sysctl_table
4862 .mode = 0644, 4871 .mode = 0644,
4863 .proc_handler = proc_dointvec, 4872 .proc_handler = proc_dointvec,
4864 }, 4873 },
4874 {
4875 .procname = "mldv1_unsolicited_report_interval",
4876 .data =
4877 &ipv6_devconf.mldv1_unsolicited_report_interval,
4878 .maxlen = sizeof(int),
4879 .mode = 0644,
4880 .proc_handler = proc_dointvec_ms_jiffies,
4881 },
4882 {
4883 .procname = "mldv2_unsolicited_report_interval",
4884 .data =
4885 &ipv6_devconf.mldv2_unsolicited_report_interval,
4886 .maxlen = sizeof(int),
4887 .mode = 0644,
4888 .proc_handler = proc_dointvec_ms_jiffies,
4889 },
4865#ifdef CONFIG_IPV6_PRIVACY 4890#ifdef CONFIG_IPV6_PRIVACY
4866 { 4891 {
4867 .procname = "use_tempaddr", 4892 .procname = "use_tempaddr",