From e94cd8113ce63bca34040aae52d0603baf6ec07c Mon Sep 17 00:00:00 2001 From: Zhang Shengju Date: Fri, 22 Sep 2017 23:57:49 +0800 Subject: net: remove MTU limits for dummy and ifb device These two drivers (dummy and ifb) call ether_setup(), after commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"), the range of mtu is [min_mtu, max_mtu], which is [68, 1500] by default. These two devices should not have limits on MTU. This patch set their min_mtu/max_mtu to 0. So that dev_set_mtu() will not check the mtu range, and can be set with any value. CC: Eric Dumazet CC: Sabrina Dubroca Signed-off-by: Zhang Shengju Signed-off-by: David S. Miller --- drivers/net/dummy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/dummy.c') diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c index e31ab3b94c6f..58483af80bdb 100644 --- a/drivers/net/dummy.c +++ b/drivers/net/dummy.c @@ -353,7 +353,7 @@ static void dummy_setup(struct net_device *dev) eth_hw_addr_random(dev); dev->min_mtu = 0; - dev->max_mtu = ETH_MAX_MTU; + dev->max_mtu = 0; } static int dummy_validate(struct nlattr *tb[], struct nlattr *data[], -- cgit v1.2.3