networkd: dhcp - only set the MTU option once

Only set MTU request when creating the dhcp client, not every time it is restarted.
This commit is contained in:
Tom Gundersen
2014-01-16 20:32:08 +01:00
parent 396945dc1f
commit 6fc7349894
+6 -6
View 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;