Browse Source

Allow bssid parameter to be cleared through ctrl_interface

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.
Wei-Jen Lin 14 years ago
parent
commit
c0a321c519
1 changed files with 6 additions and 0 deletions
  1. 6 0
      wpa_supplicant/config.c

+ 6 - 0
wpa_supplicant/config.c

@@ -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);