diff options
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index f74e4e2cdd06..c45852798092 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -598,6 +598,7 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh, | |||
598 | icmp6h.icmp6_solicited = solicited; | 598 | icmp6h.icmp6_solicited = solicited; |
599 | icmp6h.icmp6_override = override; | 599 | icmp6h.icmp6_override = override; |
600 | 600 | ||
601 | inc_opt |= ifp->idev->cnf.force_tllao; | ||
601 | __ndisc_send(dev, neigh, daddr, src_addr, | 602 | __ndisc_send(dev, neigh, daddr, src_addr, |
602 | &icmp6h, solicited_addr, | 603 | &icmp6h, solicited_addr, |
603 | inc_opt ? ND_OPT_TARGET_LL_ADDR : 0); | 604 | inc_opt ? ND_OPT_TARGET_LL_ADDR : 0); |
@@ -1768,42 +1769,6 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, void __user *bu | |||
1768 | return ret; | 1769 | return ret; |
1769 | } | 1770 | } |
1770 | 1771 | ||
1771 | int 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 | 1772 | ||
1808 | #endif | 1773 | #endif |
1809 | 1774 | ||
@@ -1857,8 +1822,7 @@ int __init ndisc_init(void) | |||
1857 | #ifdef CONFIG_SYSCTL | 1822 | #ifdef CONFIG_SYSCTL |
1858 | err = neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6, | 1823 | err = neigh_sysctl_register(NULL, &nd_tbl.parms, NET_IPV6, |
1859 | NET_IPV6_NEIGH, "ipv6", | 1824 | NET_IPV6_NEIGH, "ipv6", |
1860 | &ndisc_ifinfo_sysctl_change, | 1825 | &ndisc_ifinfo_sysctl_change); |
1861 | &ndisc_ifinfo_sysctl_strategy); | ||
1862 | if (err) | 1826 | if (err) |
1863 | goto out_unregister_pernet; | 1827 | goto out_unregister_pernet; |
1864 | #endif | 1828 | #endif |