]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/addrconf.c
net: Disable LRO on devices that are forwarding
[linux-2.6-omap-h63xx.git] / net / ipv6 / addrconf.c
index 9be6be3a7ff3cecad3fee2a98c904d3af3b9e852..84127d854cfcba1d2007d1149bfa96ef49363e83 100644 (file)
@@ -348,6 +348,8 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
                kfree(ndev);
                return NULL;
        }
+       if (ndev->cnf.forwarding)
+               dev_disable_lro(dev);
        /* We refer to the device */
        dev_hold(dev);
 
@@ -442,6 +444,8 @@ static void dev_forward_change(struct inet6_dev *idev)
        if (!idev)
                return;
        dev = idev->dev;
+       if (idev->cnf.forwarding)
+               dev_disable_lro(dev);
        if (dev && (dev->flags & IFF_MULTICAST)) {
                if (idev->cnf.forwarding)
                        ipv6_dev_mc_inc(dev, &in6addr_linklocal_allrouters);
@@ -487,12 +491,14 @@ static void addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old)
        if (p == &net->ipv6.devconf_dflt->forwarding)
                return;
 
+       rtnl_lock();
        if (p == &net->ipv6.devconf_all->forwarding) {
                __s32 newf = net->ipv6.devconf_all->forwarding;
                net->ipv6.devconf_dflt->forwarding = newf;
                addrconf_forward_change(net, newf);
        } else if ((!*p) ^ (!old))
                dev_forward_change((struct inet6_dev *)table->extra1);
+       rtnl_unlock();
 
        if (*p)
                rt6_purge_dflt_routers(net);