From: Wei-Jen Lin Date: Mon, 6 Sep 2010 15:00:04 +0000 (+0300) Subject: Allow bssid parameter to be cleared through ctrl_interface X-Git-Tag: hostap-1-bp~1062 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0a321c519e944293fd4e97dc0bb4b17204c679e;p=thirdparty%2Fhostap.git 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. --- diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index 790816a7a..4b748807c 100644 --- a/wpa_supplicant/config.c +++ b/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);