Rename the control interface BLACKLIST command to BSSID_IGNORE
Use a more specific name for the control interface command used for managing the list of BSSIDs that are temporarily ignored. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
125f0748e4
commit
72cd4293fb
2 changed files with 21 additions and 12 deletions
|
@ -2554,16 +2554,16 @@ static int wpa_supplicant_ctrl_iface_bssid(struct wpa_supplicant *wpa_s,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int wpa_supplicant_ctrl_iface_blacklist(struct wpa_supplicant *wpa_s,
|
static int wpa_supplicant_ctrl_iface_bssid_ignore(struct wpa_supplicant *wpa_s,
|
||||||
char *cmd, char *buf,
|
char *cmd, char *buf,
|
||||||
size_t buflen)
|
size_t buflen)
|
||||||
{
|
{
|
||||||
u8 bssid[ETH_ALEN];
|
u8 bssid[ETH_ALEN];
|
||||||
struct wpa_blacklist *e;
|
struct wpa_blacklist *e;
|
||||||
char *pos, *end;
|
char *pos, *end;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* cmd: "BLACKLIST [<BSSID>]" */
|
/* cmd: "BSSID_IGNORE [<BSSID>]" */
|
||||||
if (*cmd == '\0') {
|
if (*cmd == '\0') {
|
||||||
pos = buf;
|
pos = buf;
|
||||||
end = buf + buflen;
|
end = buf + buflen;
|
||||||
|
@ -2586,7 +2586,7 @@ static int wpa_supplicant_ctrl_iface_blacklist(struct wpa_supplicant *wpa_s,
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "CTRL_IFACE: BLACKLIST bssid='%s'", cmd);
|
wpa_printf(MSG_DEBUG, "CTRL_IFACE: BSSID_IGNORE bssid='%s'", cmd);
|
||||||
if (hwaddr_aton(cmd, bssid)) {
|
if (hwaddr_aton(cmd, bssid)) {
|
||||||
wpa_printf(MSG_DEBUG, "CTRL_IFACE: invalid BSSID '%s'", cmd);
|
wpa_printf(MSG_DEBUG, "CTRL_IFACE: invalid BSSID '%s'", cmd);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -10982,8 +10982,12 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||||
} else if (os_strncmp(buf, "BSSID ", 6) == 0) {
|
} else if (os_strncmp(buf, "BSSID ", 6) == 0) {
|
||||||
if (wpa_supplicant_ctrl_iface_bssid(wpa_s, buf + 6))
|
if (wpa_supplicant_ctrl_iface_bssid(wpa_s, buf + 6))
|
||||||
reply_len = -1;
|
reply_len = -1;
|
||||||
|
} else if (os_strncmp(buf, "BSSID_IGNORE", 12) == 0) {
|
||||||
|
reply_len = wpa_supplicant_ctrl_iface_bssid_ignore(
|
||||||
|
wpa_s, buf + 12, reply, reply_size);
|
||||||
} else if (os_strncmp(buf, "BLACKLIST", 9) == 0) {
|
} else if (os_strncmp(buf, "BLACKLIST", 9) == 0) {
|
||||||
reply_len = wpa_supplicant_ctrl_iface_blacklist(
|
/* deprecated backwards compatibility alias for BSSID_IGNORE */
|
||||||
|
reply_len = wpa_supplicant_ctrl_iface_bssid_ignore(
|
||||||
wpa_s, buf + 9, reply, reply_size);
|
wpa_s, buf + 9, reply, reply_size);
|
||||||
} else if (os_strncmp(buf, "LOG_LEVEL", 9) == 0) {
|
} else if (os_strncmp(buf, "LOG_LEVEL", 9) == 0) {
|
||||||
reply_len = wpa_supplicant_ctrl_iface_log_level(
|
reply_len = wpa_supplicant_ctrl_iface_log_level(
|
||||||
|
|
|
@ -1290,9 +1290,10 @@ static int wpa_cli_cmd_bssid(struct wpa_ctrl *ctrl, int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int wpa_cli_cmd_blacklist(struct wpa_ctrl *ctrl, int argc, char *argv[])
|
static int wpa_cli_cmd_bssid_ignore(struct wpa_ctrl *ctrl, int argc,
|
||||||
|
char *argv[])
|
||||||
{
|
{
|
||||||
return wpa_cli_cmd(ctrl, "BLACKLIST", 0, argc, argv);
|
return wpa_cli_cmd(ctrl, "BSSID_IGNORE", 0, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3324,11 +3325,15 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
|
||||||
{ "bssid", wpa_cli_cmd_bssid, wpa_cli_complete_network_id,
|
{ "bssid", wpa_cli_cmd_bssid, wpa_cli_complete_network_id,
|
||||||
cli_cmd_flag_none,
|
cli_cmd_flag_none,
|
||||||
"<network id> <BSSID> = set preferred BSSID for an SSID" },
|
"<network id> <BSSID> = set preferred BSSID for an SSID" },
|
||||||
{ "blacklist", wpa_cli_cmd_blacklist, wpa_cli_complete_bss,
|
{ "bssid_ignore", wpa_cli_cmd_bssid_ignore, wpa_cli_complete_bss,
|
||||||
cli_cmd_flag_none,
|
cli_cmd_flag_none,
|
||||||
"<BSSID> = add a BSSID to the blacklist\n"
|
"<BSSID> = add a BSSID to the list of temporarily ignored BSSs\n"
|
||||||
"blacklist clear = clear the blacklist\n"
|
"bssid_ignore clear = clear the list of temporarily ignored BSSIDs\n"
|
||||||
"blacklist = display the blacklist" },
|
"bssid_ignore = display the list of temporarily ignored BSSIDs" },
|
||||||
|
{ "blacklist", /* deprecated alias for bssid_ignore */
|
||||||
|
wpa_cli_cmd_bssid_ignore, wpa_cli_complete_bss,
|
||||||
|
cli_cmd_flag_none,
|
||||||
|
"= deprecated alias for bssid_ignore" },
|
||||||
{ "log_level", wpa_cli_cmd_log_level, NULL,
|
{ "log_level", wpa_cli_cmd_log_level, NULL,
|
||||||
cli_cmd_flag_none,
|
cli_cmd_flag_none,
|
||||||
"<level> [<timestamp>] = update the log level/timestamp\n"
|
"<level> [<timestamp>] = update the log level/timestamp\n"
|
||||||
|
|
Loading…
Reference in a new issue