diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index da198b938..da860604d 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -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, - char *cmd, char *buf, - size_t buflen) +static int wpa_supplicant_ctrl_iface_bssid_ignore(struct wpa_supplicant *wpa_s, + char *cmd, char *buf, + size_t buflen) { u8 bssid[ETH_ALEN]; struct wpa_blacklist *e; char *pos, *end; int ret; - /* cmd: "BLACKLIST []" */ + /* cmd: "BSSID_IGNORE []" */ if (*cmd == '\0') { pos = buf; end = buf + buflen; @@ -2586,7 +2586,7 @@ static int wpa_supplicant_ctrl_iface_blacklist(struct wpa_supplicant *wpa_s, 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)) { wpa_printf(MSG_DEBUG, "CTRL_IFACE: invalid BSSID '%s'", cmd); 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) { if (wpa_supplicant_ctrl_iface_bssid(wpa_s, buf + 6)) 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) { - 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); } else if (os_strncmp(buf, "LOG_LEVEL", 9) == 0) { reply_len = wpa_supplicant_ctrl_iface_log_level( diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c index f5bda1abd..b98a833da 100644 --- a/wpa_supplicant/wpa_cli.c +++ b/wpa_supplicant/wpa_cli.c @@ -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, cli_cmd_flag_none, " = 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, - " = add a BSSID to the blacklist\n" - "blacklist clear = clear the blacklist\n" - "blacklist = display the blacklist" }, + " = add a BSSID to the list of temporarily ignored BSSs\n" + "bssid_ignore clear = clear the list of temporarily ignored BSSIDs\n" + "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, cli_cmd_flag_none, " [] = update the log level/timestamp\n"