chiark / gitweb /
networkd: dhcp - only set the MTU option once
authorTom Gundersen <teg@jklm.no>
Thu, 16 Jan 2014 15:50:19 +0000 (16:50 +0100)
committerTom Gundersen <teg@jklm.no>
Thu, 16 Jan 2014 19:32:08 +0000 (20:32 +0100)
Only set MTU request when creating the dhcp client, not every time it is restarted.

src/network/networkd-link.c

index 6e0139c97db90e2c1a20da078db95d6c60eefcf9..296886daa4a97dbd0325a9dcf6c98b820fa1541d 100644 (file)
@@ -538,16 +538,16 @@ static int link_acquire_conf(Link *link) {
                 r = sd_dhcp_client_set_callback(link->dhcp, dhcp_handler, link);
                 if (r < 0)
                         return r;
+
+                if (link->network->dhcp_mtu) {
+                        r = sd_dhcp_client_set_request_option(link->dhcp, 26);
+                        if (r < 0)
+                                return r;
+                }
         }
 
         log_debug_link(link, "acquiring DHCPv4 lease");
 
-        if (link->network->dhcp_mtu) {
-                r = sd_dhcp_client_set_request_option(link->dhcp, 26);
-                if (r < 0)
-                        return r;
-        }
-
         r = sd_dhcp_client_start(link->dhcp);
         if (r < 0)
                 return r;