diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-08-08 14:14:20 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-08-13 08:23:31 +0200 |
commit | ee4931068e3e7a722327399db91ee020a74b3592 (patch) | |
tree | c36522fab7022502c748d2516c98396d560d66ef | |
parent | network: drop redundant lines (diff) | |
download | systemd-ee4931068e3e7a722327399db91ee020a74b3592.tar.xz systemd-ee4931068e3e7a722327399db91ee020a74b3592.zip |
network: do not re-set MTU when current and requested MTU are same
-rw-r--r-- | src/network/networkd-link.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 52b6eb3b99..9f68451dec 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1305,6 +1305,9 @@ int link_set_mtu(Link *link, uint32_t mtu) { assert(link->manager); assert(link->manager->rtnl); + if (link->mtu == mtu) + return 0; + log_link_debug(link, "Setting MTU: %" PRIu32, mtu); r = sd_rtnl_message_new_link(link->manager->rtnl, &req, RTM_SETLINK, link->ifindex); |