aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>2008-07-20 01:35:03 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-20 01:35:03 -0400
commit53b7997fd5c62408d10b9aafb38974ce90fd2356 (patch)
treebc23e6ec248a6d999cdc779abdfdc843c5640197 /net/ipv6/addrconf.c
parent721499e8931c5732202481ae24f2dfbf9910f129 (diff)
ipv6 netns: Make several "global" sysctl variables namespace aware.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 30184e0dd74c..580ae506c399 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1863,6 +1863,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len)
1863 struct inet6_ifaddr * ifp; 1863 struct inet6_ifaddr * ifp;
1864 struct in6_addr addr; 1864 struct in6_addr addr;
1865 int create = 0, update_lft = 0; 1865 int create = 0, update_lft = 0;
1866 struct net *net = dev_net(dev);
1866 1867
1867 if (pinfo->prefix_len == 64) { 1868 if (pinfo->prefix_len == 64) {
1868 memcpy(&addr, &pinfo->prefix, 8); 1869 memcpy(&addr, &pinfo->prefix, 8);
@@ -1881,7 +1882,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len)
1881 1882
1882ok: 1883ok:
1883 1884
1884 ifp = ipv6_get_ifaddr(dev_net(dev), &addr, dev, 1); 1885 ifp = ipv6_get_ifaddr(net, &addr, dev, 1);
1885 1886
1886 if (ifp == NULL && valid_lft) { 1887 if (ifp == NULL && valid_lft) {
1887 int max_addresses = in6_dev->cnf.max_addresses; 1888 int max_addresses = in6_dev->cnf.max_addresses;
@@ -1889,7 +1890,7 @@ ok:
1889 1890
1890#ifdef CONFIG_IPV6_OPTIMISTIC_DAD 1891#ifdef CONFIG_IPV6_OPTIMISTIC_DAD
1891 if (in6_dev->cnf.optimistic_dad && 1892 if (in6_dev->cnf.optimistic_dad &&
1892 !ipv6_devconf.forwarding) 1893 !net->ipv6.devconf_all->forwarding)
1893 addr_flags = IFA_F_OPTIMISTIC; 1894 addr_flags = IFA_F_OPTIMISTIC;
1894#endif 1895#endif
1895 1896
@@ -2314,11 +2315,12 @@ static void init_loopback(struct net_device *dev)
2314static void addrconf_add_linklocal(struct inet6_dev *idev, struct in6_addr *addr) 2315static void addrconf_add_linklocal(struct inet6_dev *idev, struct in6_addr *addr)
2315{ 2316{
2316 struct inet6_ifaddr * ifp; 2317 struct inet6_ifaddr * ifp;
2318 struct net *net = dev_net(idev->dev);
2317 u32 addr_flags = IFA_F_PERMANENT; 2319 u32 addr_flags = IFA_F_PERMANENT;
2318 2320
2319#ifdef CONFIG_IPV6_OPTIMISTIC_DAD 2321#ifdef CONFIG_IPV6_OPTIMISTIC_DAD
2320 if (idev->cnf.optimistic_dad && 2322 if (idev->cnf.optimistic_dad &&
2321 !ipv6_devconf.forwarding) 2323 !net->ipv6.devconf_all->forwarding)
2322 addr_flags |= IFA_F_OPTIMISTIC; 2324 addr_flags |= IFA_F_OPTIMISTIC;
2323#endif 2325#endif
2324 2326