summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/networkd-link.c')
-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);
}
}