3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 04:32:37 +01:00

test-runner: fix improper loading of radius_config

This key is special in hostapd, and was being treated as a normal hostapd
config file. This special radius config file needs to be kept unpaired from
any interfaces so now its passed in as a separate argument and appended to
the end of the hostapd execute command.
This commit is contained in:
James Prestwood 2020-03-16 12:22:41 -07:00 committed by Denis Kenzior
parent af5c77aeba
commit 24235a2af8

View File

@ -989,7 +989,7 @@ static void stop_ofono(pid_t pid)
}
static pid_t start_hostapd(char **config_files, struct wiphy **wiphys,
const char *test_name)
const char *test_name, const char *radius_conf)
{
char **argv;
pid_t pid;
@ -1029,6 +1029,9 @@ static pid_t start_hostapd(char **config_files, struct wiphy **wiphys,
argv[idx++] = config_files[i];
}
if (radius_conf)
argv[idx++] = (void *)radius_conf;
if (verbose) {
argv[idx++] = "-d";
argv[idx++] = NULL;
@ -1358,6 +1361,7 @@ static bool configure_hostapd_instances(struct l_settings *hw_settings,
int i;
char **hostapd_config_file_paths;
struct wiphy **wiphys;
const char *radius_config = NULL;
*phys_used = 0;
@ -1398,8 +1402,12 @@ static bool configure_hostapd_instances(struct l_settings *hw_settings,
goto done;
}
if (!strcmp(hostap_keys[i], "radius_server"))
if (!strcmp(hostap_keys[i], "radius_server")) {
radius_config = l_settings_get_value(hw_settings,
HW_CONFIG_GROUP_HOSTAPD,
"radius_server");
continue;
}
for (wiphy_entry = l_queue_get_entries(wiphy_list);
wiphy_entry;
@ -1478,7 +1486,8 @@ hostapd_done:
}
hostapd_pids_out[0] = start_hostapd(hostapd_config_file_paths, wiphys,
basename(config_dir_path));
basename(config_dir_path),
radius_config);
hostapd_pids_out[1] = -1;
done: