ChangeSet 1.1982.148.10, 2005/03/03 14:37:40+09:00, [EMAIL PROTECTED]
[IPV6] NDISC: Deprecate base_reachable_time and retrans_timer.
Signed-off-by: Hideaki YOSHIFUJI <[EMAIL PROTECTED]>
Documentation/filesystems/proc.txt | 6 +++---
net/ipv6/ndisc.c | 29 ++++++++++++++++++++++++++++-
2 files changed, 31 insertions(+), 4 deletions(-)
diff -Nru a/Documentation/filesystems/proc.txt
b/Documentation/filesystems/proc.txt
--- a/Documentation/filesystems/proc.txt 2005-03-12 20:44:57 -08:00
+++ b/Documentation/filesystems/proc.txt 2005-03-12 20:44:57 -08:00
@@ -1760,7 +1760,7 @@
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 @@
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
diff -Nru a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
--- a/net/ipv6/ndisc.c 2005-03-12 20:44:57 -08:00
+++ b/net/ipv6/ndisc.c 2005-03-12 20:44:57 -08:00
@@ -1536,12 +1536,35 @@
};
#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);
@@ -1578,6 +1601,10 @@
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, "procfs", dev ? dev->name :
"default");
switch (ctl->ctl_name) {
case NET_NEIGH_REACHABLE_TIME:
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html