aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ndisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r--net/ipv6/ndisc.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index f74e4e2cdd06..3d0520e455d8 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1768,42 +1768,6 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, void __user *bu
1768 return ret; 1768 return ret;
1769} 1769}
1770 1770
1771int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl,
1772 void __user *oldval, size_t __user *oldlenp,
1773 void __user *newval, size_t newlen)
1774{
1775 struct net_device *dev = ctl->extra1;
1776 struct inet6_dev *idev;
1777 int ret;
1778
1779 if (ctl->ctl_name == NET_NEIGH_RETRANS_TIME ||
1780 ctl->ctl_name == NET_NEIGH_REACHABLE_TIME)
1781 ndisc_warn_deprecated_sysctl(ctl, "procfs", dev ? dev->name : "default");
1782
1783 switch (ctl->ctl_name) {
1784 case NET_NEIGH_REACHABLE_TIME:
1785 ret = sysctl_jiffies(ctl, oldval, oldlenp, newval, newlen);
1786 break;
1787 case NET_NEIGH_RETRANS_TIME_MS:
1788 case NET_NEIGH_REACHABLE_TIME_MS:
1789 ret = sysctl_ms_jiffies(ctl, oldval, oldlenp, newval, newlen);
1790 break;
1791 default:
1792 ret = 0;
1793 }
1794
1795 if (newval && newlen && ret > 0 &&
1796 dev && (idev = in6_dev_get(dev)) != NULL) {
1797 if (ctl->ctl_name == NET_NEIGH_REACHABLE_TIME ||
1798 ctl->ctl_name == NET_NEIGH_REACHABLE_TIME_MS)
1799 idev->nd_parms->reachable_time = neigh_rand_reach_time(idev->nd_parms->base_reachable_time);
1800 idev->tstamp = jiffies;
1801 inet6_ifinfo_notify(RTM_NEWLINK, idev);
1802 in6_dev_put(idev);
1803 }
1804
1805 return ret;
1806}
1807 1771
1808#endif 1772#endif
1809 1773
@@ -1857,8 +1821,7 @@ int __init ndisc_init(void)
1857#ifdef CONFIG_SYSCTL 1821#ifdef CONFIG_SYSCTL
1858 err = neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6, 1822 err = neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6,
1859 NET_IPV6_NEIGH, "ipv6", 1823 NET_IPV6_NEIGH, "ipv6",
1860 &ndisc_ifinfo_sysctl_change, 1824 &ndisc_ifinfo_sysctl_change);
1861 &ndisc_ifinfo_sysctl_strategy);
1862 if (err) 1825 if (err)
1863 goto out_unregister_pernet; 1826 goto out_unregister_pernet;
1864#endif 1827#endif