]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
network: Add error message if iw couldn't be found 3661/head
authorMax <blenkmax@gmail.com>
Sat, 6 Feb 2021 19:13:15 +0000 (20:13 +0100)
committerMax <blenkmax@gmail.com>
Mon, 8 Feb 2021 19:42:27 +0000 (20:42 +0100)
When iw is not installed on the host, lxc fails to move wireless devices
into a container. Unfortunately there is no real error message yet
(other than that it didn't work), so its quite unobvious what causes
this. This commit adds a error message that clearly states the
application iw is missing.

Signed-off-by: Maximilian Blenk <blenkmax@gmail.com>
src/lxc/network.c

index 7542521ffcd8c4e0c8ee5664bcdc08e797f1349b..005a21f702c58d3b69da5fa07b8b33bbaeb9084b 100644 (file)
@@ -1553,8 +1553,10 @@ int lxc_netdev_move_wlan(char *physname, const char *ifname, pid_t pid,
         * the 80211 module, so for now just call out to iw.
         */
        cmd = on_path("iw", NULL);
-       if (!cmd)
+       if (!cmd) {
+               ERROR("Couldn't find the application iw in PATH");
                return -1;
+       }
 
        fpid = fork();
        if (fpid < 0)