dummy: expend mtu range for dummy device
authorZhang Shengju <zhangshengju@cmss.chinamobile.com>
Wed, 7 Dec 2016 09:41:33 +0000 (17:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Dec 2016 18:29:45 +0000 (13:29 -0500)
After commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"),
the mtu range for dummy device becomes [68, 1500].

This patch extends it to [0, 65535].

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dummy.c

index 69fc8409a9733ffe2f6f312f0955bb506657355b..6421835f11b7eef6de593a07210a144c1e4c3ce4 100644 (file)
@@ -154,6 +154,9 @@ static void dummy_setup(struct net_device *dev)
        dev->hw_features |= dev->features;
        dev->hw_enc_features |= dev->features;
        eth_hw_addr_random(dev);
+
+       dev->min_mtu = 0;
+       dev->max_mtu = ETH_MAX_MTU;
 }
 
 static int dummy_validate(struct nlattr *tb[], struct nlattr *data[])