diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index b1334e2e6..60f85624f 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -5129,7 +5129,7 @@ int main(int argc, char *argv[]) eloop_register_signal_terminate(wpa_cli_terminate, NULL); - if (ctrl_ifname == NULL) + if (!ctrl_ifname && !global) ctrl_ifname = wpa_cli_get_default_ifname(); if (reconnect && action_file && ctrl_ifname) {