Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da448f6a authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

libnetutils: Fix up the dhcp request arguments

The interface/config-file arguments passed to the dhcpcd invocation
when a hostname isn't provided were swapped, causing requests to be made
for interface <config-file-name> instead of <interface-name>, and
failing all calls to start dhcpcd through netutils with the following error:

E/DhcpStateMachine( 3214): DHCP failed on wlan0: Timed out waiting for dhcpcd to start

because...

<3>[  582.717015] init: no such service 'dhcpcd_/system/etc/dhcpcd/dhcpcd.conf:-f wlan0 wlan0'

Change-Id: Ic2e026ae8ebebdc9a27f5d7a6274e1c5c8a2f95e
parent 57bf34d8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -211,7 +211,7 @@ int dhcp_do_request(const char *interface,
                 p2p_interface, DHCP_CONFIG_PATH, prop_value, interface);
    else
        snprintf(daemon_cmd, sizeof(daemon_cmd), "%s_%s:-f %s %s", DAEMON_NAME,
                 DHCP_CONFIG_PATH, p2p_interface, interface);
                 p2p_interface, DHCP_CONFIG_PATH, interface);
    memset(prop_value, '\0', PROPERTY_VALUE_MAX);
    property_set(ctrl_prop, daemon_cmd);
    if (wait_for_property(daemon_prop_name, desired_status, 10) < 0) {