net: report right mtu value in error message
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 17 Oct 2016 17:02:22 +0000 (18:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Oct 2016 17:13:23 +0000 (13:13 -0400)
Check is for max_mtu but message reports min_mtu.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index 6498cc2ba8f65c3ea708f0df087ce62a7edefb80..352e9812960110f789eee25482ada1142215cb78 100644 (file)
@@ -6372,7 +6372,7 @@ int dev_set_mtu(struct net_device *dev, int new_mtu)
 
        if (dev->max_mtu > 0 && new_mtu > dev->max_mtu) {
                net_err_ratelimited("%s: Invalid MTU %d requested, hw max %d\n",
-                                   dev->name, new_mtu, dev->min_mtu);
+                                   dev->name, new_mtu, dev->max_mtu);
                return -EINVAL;
        }