dhcp: dhclient: fix daemon start when dhcp-timeout is specified

A typo in the new dhcp-timeout option caused the dhclient daemon to exit
with error when the dhcp-timeout option was specified.
This prevents dhcp connection to be upped.

Fixes: 82ef497cc9
This commit is contained in:
Francesco Giudici 2017-09-11 14:50:06 +02:00
parent 7d00a96d23
commit fa46736013

View file

@ -453,7 +453,7 @@ dhclient_start (NMDhcpClient *client,
timeout = nm_dhcp_client_get_timeout (client);
if (timeout >= 60) {
timeout = timeout < G_MAXINT32 ? timeout + 1 : G_MAXINT32;
g_ptr_array_add (argv, (gpointer) "-timeout");
g_ptr_array_add (argv, (gpointer) "--timeout");
g_ptr_array_add (argv, (gpointer) nm_sprintf_buf (timeout_str, "%u", (unsigned) timeout));
}