diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2006-03-20 20:05:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-20 20:05:47 -0500 |
commit | 52e1635631b342803aecaf81a362c1464e3da2e5 (patch) | |
tree | 971c40743f7fcb594697dd18d22e2d8b168d1785 | |
parent | 930d6ff2e2a5f1538448d3b0b2652a8f0c0f6cba (diff) |
[IPV6]: ROUTE: Add router_probe_interval sysctl.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | Documentation/networking/ip-sysctl.txt | 6 | ||||
-rw-r--r-- | include/linux/ipv6.h | 2 | ||||
-rw-r--r-- | include/linux/sysctl.h | 1 | ||||
-rw-r--r-- | net/ipv6/addrconf.c | 12 | ||||
-rw-r--r-- | net/ipv6/route.c | 2 |
5 files changed, 22 insertions, 1 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 87bbd774c2b2..88efed0a533f 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -789,6 +789,12 @@ mtu - INTEGER | |||
789 | Default Maximum Transfer Unit | 789 | Default Maximum Transfer Unit |
790 | Default: 1280 (IPv6 required minimum) | 790 | Default: 1280 (IPv6 required minimum) |
791 | 791 | ||
792 | router_probe_interval - INTEGER | ||
793 | Minimum interval (in seconds) between Router Probing described | ||
794 | in RFC4191. | ||
795 | |||
796 | Default: 60 | ||
797 | |||
792 | router_solicitation_delay - INTEGER | 798 | router_solicitation_delay - INTEGER |
793 | Number of seconds to wait after interface is brought up | 799 | Number of seconds to wait after interface is brought up |
794 | before sending Router Solicitations. | 800 | before sending Router Solicitations. |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 108b75dccd9f..c609cc702375 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -149,6 +149,7 @@ struct ipv6_devconf { | |||
149 | __s32 accept_ra_pinfo; | 149 | __s32 accept_ra_pinfo; |
150 | #ifdef CONFIG_IPV6_ROUTER_PREF | 150 | #ifdef CONFIG_IPV6_ROUTER_PREF |
151 | __s32 accept_ra_rtr_pref; | 151 | __s32 accept_ra_rtr_pref; |
152 | __s32 rtr_probe_interval; | ||
152 | #endif | 153 | #endif |
153 | void *sysctl; | 154 | void *sysctl; |
154 | }; | 155 | }; |
@@ -175,6 +176,7 @@ enum { | |||
175 | DEVCONF_ACCEPT_RA_DEFRTR, | 176 | DEVCONF_ACCEPT_RA_DEFRTR, |
176 | DEVCONF_ACCEPT_RA_PINFO, | 177 | DEVCONF_ACCEPT_RA_PINFO, |
177 | DEVCONF_ACCEPT_RA_RTR_PREF, | 178 | DEVCONF_ACCEPT_RA_RTR_PREF, |
179 | DEVCONF_RTR_PROBE_INTERVAL, | ||
178 | DEVCONF_MAX | 180 | DEVCONF_MAX |
179 | }; | 181 | }; |
180 | 182 | ||
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 236f537b38d2..f49488ffefef 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -534,6 +534,7 @@ enum { | |||
534 | NET_IPV6_ACCEPT_RA_DEFRTR=18, | 534 | NET_IPV6_ACCEPT_RA_DEFRTR=18, |
535 | NET_IPV6_ACCEPT_RA_PINFO=19, | 535 | NET_IPV6_ACCEPT_RA_PINFO=19, |
536 | NET_IPV6_ACCEPT_RA_RTR_PREF=20, | 536 | NET_IPV6_ACCEPT_RA_RTR_PREF=20, |
537 | NET_IPV6_RTR_PROBE_INTERVAL=21, | ||
537 | __NET_IPV6_MAX | 538 | __NET_IPV6_MAX |
538 | }; | 539 | }; |
539 | 540 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 51edba5fea26..e7add61e6e39 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -169,6 +169,7 @@ struct ipv6_devconf ipv6_devconf = { | |||
169 | .accept_ra_pinfo = 1, | 169 | .accept_ra_pinfo = 1, |
170 | #ifdef CONFIG_IPV6_ROUTER_PREF | 170 | #ifdef CONFIG_IPV6_ROUTER_PREF |
171 | .accept_ra_rtr_pref = 1, | 171 | .accept_ra_rtr_pref = 1, |
172 | .rtr_probe_interval = 60 * HZ, | ||
172 | #endif | 173 | #endif |
173 | }; | 174 | }; |
174 | 175 | ||
@@ -195,6 +196,7 @@ static struct ipv6_devconf ipv6_devconf_dflt = { | |||
195 | .accept_ra_pinfo = 1, | 196 | .accept_ra_pinfo = 1, |
196 | #ifdef CONFIG_IPV6_ROUTER_PREF | 197 | #ifdef CONFIG_IPV6_ROUTER_PREF |
197 | .accept_ra_rtr_pref = 1, | 198 | .accept_ra_rtr_pref = 1, |
199 | .rtr_probe_interval = 60 * HZ, | ||
198 | #endif | 200 | #endif |
199 | }; | 201 | }; |
200 | 202 | ||
@@ -3130,6 +3132,7 @@ static void inline ipv6_store_devconf(struct ipv6_devconf *cnf, | |||
3130 | array[DEVCONF_ACCEPT_RA_PINFO] = cnf->accept_ra_pinfo; | 3132 | array[DEVCONF_ACCEPT_RA_PINFO] = cnf->accept_ra_pinfo; |
3131 | #ifdef CONFIG_IPV6_ROUTER_PREF | 3133 | #ifdef CONFIG_IPV6_ROUTER_PREF |
3132 | array[DEVCONF_ACCEPT_RA_RTR_PREF] = cnf->accept_ra_rtr_pref; | 3134 | array[DEVCONF_ACCEPT_RA_RTR_PREF] = cnf->accept_ra_rtr_pref; |
3135 | array[DEVCONF_RTR_PROBE_INTERVAL] = cnf->rtr_probe_interval; | ||
3133 | #endif | 3136 | #endif |
3134 | } | 3137 | } |
3135 | 3138 | ||
@@ -3608,6 +3611,15 @@ static struct addrconf_sysctl_table | |||
3608 | .mode = 0644, | 3611 | .mode = 0644, |
3609 | .proc_handler = &proc_dointvec, | 3612 | .proc_handler = &proc_dointvec, |
3610 | }, | 3613 | }, |
3614 | { | ||
3615 | .ctl_name = NET_IPV6_RTR_PROBE_INTERVAL, | ||
3616 | .procname = "router_probe_interval", | ||
3617 | .data = &ipv6_devconf.rtr_probe_interval, | ||
3618 | .maxlen = sizeof(int), | ||
3619 | .mode = 0644, | ||
3620 | .proc_handler = &proc_dointvec_jiffies, | ||
3621 | .strategy = &sysctl_jiffies, | ||
3622 | }, | ||
3611 | #endif | 3623 | #endif |
3612 | { | 3624 | { |
3613 | .ctl_name = 0, /* sentinel */ | 3625 | .ctl_name = 0, /* sentinel */ |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 8ba8900c0a5f..c797b9bbb7d1 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -234,7 +234,7 @@ static void rt6_probe(struct rt6_info *rt) | |||
234 | return; | 234 | return; |
235 | read_lock_bh(&neigh->lock); | 235 | read_lock_bh(&neigh->lock); |
236 | if (!(neigh->nud_state & NUD_VALID) && | 236 | if (!(neigh->nud_state & NUD_VALID) && |
237 | time_after(jiffies, neigh->updated + 60 * HZ)) { | 237 | time_after(jiffies, neigh->updated + rt->rt6i_idev->cnf.rtr_probe_interval)) { |
238 | struct in6_addr mcaddr; | 238 | struct in6_addr mcaddr; |
239 | struct in6_addr *target; | 239 | struct in6_addr *target; |
240 | 240 | ||