Commit f381e657 authored by Hideaki Yoshifuji's avatar Hideaki Yoshifuji

[IPV6] NDISC: Deprecate base_reachable_time and retrans_timer.

Signed-off-by: default avatarHideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
parent 42ed4aad
......@@ -1760,7 +1760,7 @@ base_reachable_time, base_reachable_time_ms
A base value used for computing the random reachable time value as specified
in RFC2461.
Expression of base_reachable_time is in seconds.
Expression of base_reachable_time, which is deprecated, is in seconds.
Expression of base_reachable_time_ms is in milliseconds.
retrans_time, retrans_time_ms
......@@ -1770,8 +1770,8 @@ The time between retransmitted Neighbor Solicitation messages.
Used for address resolution and to determine if a neighbor is
unreachable.
Expression of retrans_time is in 1/100 seconds (for IPv4) or in jiffies
(for IPv6).
Expression of retrans_time, which is deprecated, is in 1/100 seconds (for
IPv4) or in jiffies (for IPv6).
Expression of retrans_time_ms is in milliseconds.
unres_qlen
......
......@@ -1536,12 +1536,35 @@ static struct notifier_block ndisc_netdev_notifier = {
};
#ifdef CONFIG_SYSCTL
static void ndisc_warn_deprecated_sysctl(struct ctl_table *ctl,
const char *func, const char *dev_name)
{
static char warncomm[TASK_COMM_LEN];
static int warned;
if (strcmp(warncomm, current->comm) && warned < 5) {
strcpy(warncomm, current->comm);
printk(KERN_WARNING
"process `%s' is using deprecated sysctl (%s) "
"net.ipv6.neigh.%s.%s; "
"Use net.ipv6.neigh.%s.%s_ms "
"instead.\n",
warncomm, func,
dev_name, ctl->procname,
dev_name, ctl->procname);
warned++;
}
}
int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * filp, void __user *buffer, size_t *lenp, loff_t *ppos)
{
struct net_device *dev = ctl->extra1;
struct inet6_dev *idev;
int ret;
if (ctl->ctl_name == NET_NEIGH_RETRANS_TIME ||
ctl->ctl_name == NET_NEIGH_REACHABLE_TIME)
ndisc_warn_deprecated_sysctl(ctl, "syscall", dev ? dev->name : "default");
switch (ctl->ctl_name) {
case NET_NEIGH_RETRANS_TIME:
ret = proc_dointvec(ctl, write, filp, buffer, lenp, ppos);
......@@ -1579,6 +1602,10 @@ int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name, int nlen,
struct inet6_dev *idev;
int ret;
if (ctl->ctl_name == NET_NEIGH_RETRANS_TIME ||
ctl->ctl_name == NET_NEIGH_REACHABLE_TIME)
ndisc_warn_deprecated_sysctl(ctl, "procfs", dev ? dev->name : "default");
switch (ctl->ctl_name) {
case NET_NEIGH_REACHABLE_TIME:
ret = sysctl_jiffies(ctl, name, nlen,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment