1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 11:55:44 +03:00

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 16:50:19 +01:00
parent 396945dc1f
commit 6fc7349894

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;