aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2006-03-20 17:05:47 -0800
committerDavid S. Miller <davem@davemloft.net>2006-03-20 17:05:47 -0800
commit52e1635631b342803aecaf81a362c1464e3da2e5 (patch)
tree971c40743f7fcb594697dd18d22e2d8b168d1785 /net
parent[IPV6]: ROUTE: Add accept_ra_rtr_pref sysctl. (diff)
downloadlinux-dev-52e1635631b342803aecaf81a362c1464e3da2e5.tar.xz
linux-dev-52e1635631b342803aecaf81a362c1464e3da2e5.zip
[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>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/addrconf.c12
-rw-r--r--net/ipv6/route.c2
2 files changed, 13 insertions, 1 deletions
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 = {
.accept_ra_pinfo = 1,
#ifdef CONFIG_IPV6_ROUTER_PREF
.accept_ra_rtr_pref = 1,
+ .rtr_probe_interval = 60 * HZ,
#endif
};
@@ -195,6 +196,7 @@ static struct ipv6_devconf ipv6_devconf_dflt = {
.accept_ra_pinfo = 1,
#ifdef CONFIG_IPV6_ROUTER_PREF
.accept_ra_rtr_pref = 1,
+ .rtr_probe_interval = 60 * HZ,
#endif
};
@@ -3130,6 +3132,7 @@ static void inline ipv6_store_devconf(struct ipv6_devconf *cnf,
array[DEVCONF_ACCEPT_RA_PINFO] = cnf->accept_ra_pinfo;
#ifdef CONFIG_IPV6_ROUTER_PREF
array[DEVCONF_ACCEPT_RA_RTR_PREF] = cnf->accept_ra_rtr_pref;
+ array[DEVCONF_RTR_PROBE_INTERVAL] = cnf->rtr_probe_interval;
#endif
}
@@ -3608,6 +3611,15 @@ static struct addrconf_sysctl_table
.mode = 0644,
.proc_handler = &proc_dointvec,
},
+ {
+ .ctl_name = NET_IPV6_RTR_PROBE_INTERVAL,
+ .procname = "router_probe_interval",
+ .data = &ipv6_devconf.rtr_probe_interval,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = &proc_dointvec_jiffies,
+ .strategy = &sysctl_jiffies,
+ },
#endif
{
.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)
return;
read_lock_bh(&neigh->lock);
if (!(neigh->nud_state & NUD_VALID) &&
- time_after(jiffies, neigh->updated + 60 * HZ)) {
+ time_after(jiffies, neigh->updated + rt->rt6i_idev->cnf.rtr_probe_interval)) {
struct in6_addr mcaddr;
struct in6_addr *target;