macvlan: fix gso_max_size setting
authorPatrick McHardy <kaber@trash.net>
Mon, 23 Nov 2009 22:18:53 +0000 (14:18 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Nov 2009 22:18:53 +0000 (14:18 -0800)
gso_max_size must be set based on the value of the underlying device to
support devices not using the full 64k.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c

index 3aabfd9dd2121d7eaab6a7f30e2113e4bc0d22c4..2490aa39804ce3e6e6d74727cc0fa082034526a3 100644 (file)
@@ -360,6 +360,7 @@ static int macvlan_init(struct net_device *dev)
        dev->state              = (dev->state & ~MACVLAN_STATE_MASK) |
                                  (lowerdev->state & MACVLAN_STATE_MASK);
        dev->features           = lowerdev->features & MACVLAN_FEATURES;
+       dev->gso_max_size       = lowerdev->gso_max_size;
        dev->iflink             = lowerdev->ifindex;
        dev->hard_header_len    = lowerdev->hard_header_len;
 
@@ -596,6 +597,7 @@ static int macvlan_device_event(struct notifier_block *unused,
        case NETDEV_FEAT_CHANGE:
                list_for_each_entry(vlan, &port->vlans, list) {
                        vlan->dev->features = dev->features & MACVLAN_FEATURES;
+                       vlan->dev->gso_max_size = dev->gso_max_size;
                        netdev_features_change(vlan->dev);
                }
                break;