summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-08-08 14:14:20 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-08-13 08:23:31 +0200
commitee4931068e3e7a722327399db91ee020a74b3592 (patch)
treec36522fab7022502c748d2516c98396d560d66ef
parentnetwork: drop redundant lines (diff)
downloadsystemd-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.c3
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);