summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-01-16 15:09:57 +0100
committerTom Gundersen <teg@jklm.no>2014-01-16 20:32:08 +0100
commit396945dc1f37fc95eb6681dfb62f328920079a55 (patch)
tree84a476185f6cc0a3adf4f236b2fdb375a23f72da /src/network
parent1f6d9bc9ee894d4023b7eacea1754986f25bce57 (diff)
networkd: link - only save original MTU when necessary
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-link.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 8960b60ab1..6e0139c97d 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -828,9 +828,11 @@ int link_update(Link *link, sd_rtnl_message *m) {
}
while (sd_rtnl_message_read(m, &type, &data) > 0) {
- if (type == IFLA_MTU && link->network->dhcp_mtu && !link->original_mtu) {
+ if (type == IFLA_MTU && link->network->dhcp &&
+ link->network->dhcp_mtu && !link->original_mtu) {
link->original_mtu = *(uint16_t *) data;
- log_debug_link(link, "saved original MTU: %" PRIu16, link->original_mtu);
+ log_debug_link(link, "saved original MTU: %" PRIu16,
+ link->original_mtu);
}
}