diff options
Diffstat (limited to 'lib/netdev-linux.c')
-rw-r--r-- | lib/netdev-linux.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 19a80fbe1..49475360d 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -1030,6 +1030,10 @@ netdev_linux_set_mtu(const struct netdev *netdev_, int mtu) struct ifreq ifr; int error; + if (netdev_dev->cache_valid & VALID_MTU && + netdev_dev->mtu == mtu) { + return 0; + } ifr.ifr_mtu = mtu; error = netdev_linux_do_ioctl(netdev_get_name(netdev_), &ifr, SIOCSIFMTU, "SIOCSIFMTU"); |