]> err.no Git - linux-2.6/blobdiff - net/ipv6/ndisc.c
Merge branch 'linus' into cpus4096
[linux-2.6] / net / ipv6 / ndisc.c
index a55fc05b81251463ccc6ed07dac1d8ba9c545491..beb48e3f038afbfa6199b333ddc0b2e61e4683ba 100644 (file)
@@ -784,15 +784,17 @@ static void ndisc_recv_ns(struct sk_buff *skb)
 
                idev = ifp->idev;
        } else {
+               struct net *net = dev_net(dev);
+
                idev = in6_dev_get(dev);
                if (!idev) {
                        /* XXX: count this drop? */
                        return;
                }
 
-               if (ipv6_chk_acast_addr(dev_net(dev), dev, &msg->target) ||
+               if (ipv6_chk_acast_addr(net, dev, &msg->target) ||
                    (idev->cnf.forwarding &&
-                    (ipv6_devconf.proxy_ndp || idev->cnf.proxy_ndp) &&
+                    (net->ipv6.devconf_all->proxy_ndp || idev->cnf.proxy_ndp) &&
                     (is_router = pndisc_is_router(&msg->target, dev)) >= 0)) {
                        if (!(NEIGH_CB(skb)->flags & LOCALLY_ENQUEUED) &&
                            skb->pkt_type != PACKET_HOST &&
@@ -921,6 +923,7 @@ static void ndisc_recv_na(struct sk_buff *skb)
 
        if (neigh) {
                u8 old_flags = neigh->flags;
+               struct net *net = dev_net(dev);
 
                if (neigh->nud_state & NUD_FAILED)
                        goto out;
@@ -931,8 +934,8 @@ static void ndisc_recv_na(struct sk_buff *skb)
                 * has already sent a NA to us.
                 */
                if (lladdr && !memcmp(lladdr, dev->dev_addr, dev->addr_len) &&
-                   ipv6_devconf.forwarding && ipv6_devconf.proxy_ndp &&
-                   pneigh_lookup(&nd_tbl, dev_net(dev), &msg->target, dev, 0)) {
+                   net->ipv6.devconf_all->forwarding && net->ipv6.devconf_all->proxy_ndp &&
+                   pneigh_lookup(&nd_tbl, net, &msg->target, dev, 0)) {
                        /* XXX: idev->cnf.prixy_ndp */
                        goto out;
                }
@@ -1727,10 +1730,10 @@ int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl, int write, struct file * f
        return ret;
 }
 
-static int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name,
-                                       int nlen, void __user *oldval,
-                                       size_t __user *oldlenp,
-                                       void __user *newval, size_t newlen)
+int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name,
+                                int nlen, void __user *oldval,
+                                size_t __user *oldlenp,
+                                void __user *newval, size_t newlen)
 {
        struct net_device *dev = ctl->extra1;
        struct inet6_dev *idev;