Allow bssid parameter to be cleared through ctrl_interface
authorWei-Jen Lin <wjlin@atheros.com>
Mon, 6 Sep 2010 15:00:04 +0000 (18:00 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 10 Sep 2010 17:30:25 +0000 (10:30 -0700)
Setting bssid to an empty string, "", or any can now be used to
clear the bssid_set flag in a network block, i.e., to remove bssid
filtering.

wpa_supplicant/config.c

index 790816a..4b74880 100644 (file)
@@ -284,6 +284,12 @@ static int wpa_config_parse_bssid(const struct parse_data *data,
                                  struct wpa_ssid *ssid, int line,
                                  const char *value)
 {
+       if (value[0] == '\0' || os_strcmp(value, "\"\"") == 0 ||
+           os_strcmp(value, "any") == 0) {
+               ssid->bssid_set = 0;
+               wpa_printf(MSG_MSGDUMP, "BSSID any");
+               return 0;
+       }
        if (hwaddr_aton(value, ssid->bssid)) {
                wpa_printf(MSG_ERROR, "Line %d: Invalid BSSID '%s'.",
                           line, value);