]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Rename the control interface BLACKLIST command to BSSID_IGNORE
authorJouni Malinen <j@w1.fi>
Sun, 7 Feb 2021 14:29:53 +0000 (16:29 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 7 Feb 2021 14:29:53 +0000 (16:29 +0200)
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>
wpa_supplicant/ctrl_iface.c
wpa_supplicant/wpa_cli.c

index da198b938ba386c543875e53a3a31bbdc4cb7865..da860604d91b9d6e2253d2d2f8e8529cd7fef2a6 100644 (file)
@@ -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 [<BSSID>]" */
+       /* cmd: "BSSID_IGNORE [<BSSID>]" */
        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(
index f5bda1abd0b2198668fa6398537b76b5ed8152ad..b98a833dac80efc0b4dd91d6df1e1395d4386268 100644 (file)
@@ -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,
          "<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,
+         "<BSSID> = 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,
-         "<BSSID> = add a BSSID to the blacklist\n"
-         "blacklist clear = clear the blacklist\n"
-         "blacklist = display the blacklist" },
+         "= deprecated alias for bssid_ignore" },
        { "log_level", wpa_cli_cmd_log_level, NULL,
          cli_cmd_flag_none,
          "<level> [<timestamp>] = update the log level/timestamp\n"