summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-01-16 16:50:19 +0100
committerTom Gundersen <teg@jklm.no>2014-01-16 20:32:08 +0100
commit6fc73498945da749744041d4e10cf8dfac5c3bc6 (patch)
tree3ae9a207018bc85bb9aae740104b27104662cb4d /src
parent396945dc1f37fc95eb6681dfb62f328920079a55 (diff)
networkd: dhcp - only set the MTU option once
Only set MTU request when creating the dhcp client, not every time it is restarted.
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-link.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 6e0139c97d..296886daa4 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -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;