summaryrefslogtreecommitdiffstats
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2013-12-07 19:26:57 +0100
committerDavid S. Miller <davem@davemloft.net>2013-12-09 20:56:12 -0500
commitbba24896f022d4d239494bebf18e713cd8aec7a5 (patch)
tree03fc9ec1ff30dcc822c1a7ff421b69b1e9228502 /net/core/neighbour.c
parent1d4c8c29841b9991cdf3c7cc4ba7f96a94f104ca (diff)
downloadop-kernel-dev-bba24896f022d4d239494bebf18e713cd8aec7a5.zip
op-kernel-dev-bba24896f022d4d239494bebf18e713cd8aec7a5.tar.gz
neigh: ipv6: respect default values set before an address is assigned to device
Make the behaviour similar to ipv4. This will allow user to set sysctl default neigh param values and these values will be respected even by devices registered before (that ones what do not have address set yet). Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index c4a7879..ce2b775 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -39,6 +39,7 @@
#include <linux/string.h>
#include <linux/log2.h>
#include <linux/inetdevice.h>
+#include <net/addrconf.h>
#define DEBUG
#define NEIGH_DEBUG 1
@@ -2819,8 +2820,12 @@ static int proc_unres_qlen(struct ctl_table *ctl, int write,
static struct neigh_parms *neigh_get_dev_parms_rcu(struct net_device *dev,
int family)
{
- if (family == AF_INET)
+ switch (family) {
+ case AF_INET:
return __in_dev_arp_parms_get_rcu(dev);
+ case AF_INET6:
+ return __in6_dev_nd_parms_get_rcu(dev);
+ }
return NULL;
}
OpenPOWER on IntegriCloud