dummy: expend mtu range for dummy device

After commit 61e84623ac ("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>
This commit is contained in:
Zhang Shengju 2016-12-07 17:41:33 +08:00 committed by David S. Miller
parent e82621e329
commit 25e3e84b18
1 changed files with 3 additions and 0 deletions

View File

@ -154,6 +154,9 @@ static void dummy_setup(struct net_device *dev)
dev->hw_features |= dev->features; dev->hw_features |= dev->features;
dev->hw_enc_features |= dev->features; dev->hw_enc_features |= dev->features;
eth_hw_addr_random(dev); 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[]) static int dummy_validate(struct nlattr *tb[], struct nlattr *data[])