networkd: change UseMTU default to true. (#6837)
authorDimitri John Ledkov <xnox@ubuntu.com>
Tue, 19 Sep 2017 08:26:17 +0000 (09:26 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 19 Sep 2017 08:26:17 +0000 (10:26 +0200)
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
man/systemd.network.xml
src/network/networkd-network.c

diff --git a/NEWS b/NEWS
index 4940902..32c01bb 100644 (file)
--- 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
index 2055808..6f01dac 100644 (file)
           <listitem>
             <para>When true, the interface maximum transmission unit
             from the DHCP server will be used on the current link.
-            Defaults to false.</para>
+            Defaults to true.</para>
           </listitem>
         </varlistentry>
         <varlistentry>
index f2da314..24f8ee6 100644 (file)
@@ -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;