From 22043e4317ecd2bc7834b48a6d364de76bb26d91 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Tue, 19 Sep 2017 09:26:17 +0100 Subject: [PATCH] networkd: change UseMTU default to true. (#6837) Typically when DHCP server sets MTU it is a lower one. And a lower than usual MTU is then thus required on said network to have operational networking. This makes networkd's dhcp client to work in more similar way to other dhcp-clients (e.g. isc-dhcp). In particular, in a cloud setting, without this default instances have resulted in timing out talking to cloud metadata source and failing to provision. This does not change this default for the Annonymize code path. --- NEWS | 5 +++++ man/systemd.network.xml | 2 +- src/network/networkd-network.c | 3 +-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 4940902451e..32c01bb8dd9 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,11 @@ CHANGES WITH 235: respectively. They complement the existing "set-log-level" and "set-log-target" verbs, which can be used to change those values. + * systemd-networkd .network DHCP setting UseMTU default has changed + from false to true. Meaning, DHCP server advertised mtu setting is + now applied by default. This resolves networking issues on low-mtu + networks. + CHANGES WITH 234: * Meson is now supported as build system in addition to Automake. It is diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 2055808741a..6f01dac5932 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -1050,7 +1050,7 @@ When true, the interface maximum transmission unit from the DHCP server will be used on the current link. - Defaults to false. + Defaults to true. diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index f2da3141f81..24f8ee6e9c0 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -222,8 +222,7 @@ static int network_load_one(Manager *manager, const char *filename) { * even if they are commented in the man? * These vars might be overwriten by network_apply_anonymize_if_set */ network->dhcp_vendor_class_identifier = false; - /* NOTE: from man: UseMTU=... Defaults to false*/ - network->dhcp_use_mtu = false; + network->dhcp_use_mtu = true; /* NOTE: from man: UseTimezone=... Defaults to "no".*/ network->dhcp_use_timezone = false; -- 2.39.2