diff options
author | David S. Miller | 2013-12-10 02:56:27 +0100 |
---|---|---|
committer | David S. Miller | 2013-12-10 02:56:27 +0100 |
commit | 4e5887934627884ae8445f524a48125f974a78c3 (patch) | |
tree | 03fc9ec1ff30dcc822c1a7ff421b69b1e9228502 /net/ipv4/devinet.c | |
parent | Merge branch 'phy_reset' (diff) | |
parent | neigh: ipv6: respect default values set before an address is assigned to device (diff) | |
download | kernel-qcow2-linux-4e5887934627884ae8445f524a48125f974a78c3.tar.gz kernel-qcow2-linux-4e5887934627884ae8445f524a48125f974a78c3.tar.xz kernel-qcow2-linux-4e5887934627884ae8445f524a48125f974a78c3.zip |
Merge branch 'neigh'
Jiri Pirko says:
====================
neigh: respect default parms values
This is a long standing regression. But since the patchset is bigger and
the regression happened in 2007, I'm proposing this to net-next instead.
Basically the problem is that if user wants to use /etc/sysctl.conf to specify
default values of neigh related params, he is not able to do that.
The reason is that the default values are copied to dev instance right after
netdev is registered. And that is way to early. The original behaviour
for ipv4 was that this happened after first address was assigned to device.
For ipv6 this was apparently from the very beginning.
So this patchset basically reverts the behaviour back to what it was in 2007 for
ipv4 and changes the behaviour for ipv6 so they are both the same.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index a1b5bcbd04ae..43065be36301 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -500,6 +500,7 @@ static int inet_set_ifa(struct net_device *dev, struct in_ifaddr *ifa) return -ENOBUFS; } ipv4_devconf_setall(in_dev); + neigh_parms_data_state_setall(in_dev->arp_parms); if (ifa->ifa_dev != in_dev) { WARN_ON(ifa->ifa_dev); in_dev_hold(in_dev); @@ -747,6 +748,7 @@ static struct in_ifaddr *rtm_to_ifaddr(struct net *net, struct nlmsghdr *nlh, goto errout; ipv4_devconf_setall(in_dev); + neigh_parms_data_state_setall(in_dev->arp_parms); in_dev_hold(in_dev); if (tb[IFA_ADDRESS] == NULL) @@ -2160,7 +2162,7 @@ static void __devinet_sysctl_unregister(struct ipv4_devconf *cnf) static void devinet_sysctl_register(struct in_device *idev) { - neigh_sysctl_register(idev->dev, idev->arp_parms, "ipv4", NULL); + neigh_sysctl_register(idev->dev, idev->arp_parms, NULL); __devinet_sysctl_register(dev_net(idev->dev), idev->dev->name, &idev->cnf); } |