Disable AP PIN on all interfaces controlled by the same process
[libeap.git] / wpa_supplicant / config.c
index fa0d22c..6e03760 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);
@@ -1495,7 +1501,7 @@ static const struct parse_data ssid_fields[] = {
 #endif /* IEEE8021X_EAPOL */
        { INT_RANGE(mode, 0, 4) },
        { INT_RANGE(proactive_key_caching, 0, 1) },
-       { INT_RANGE(disabled, 0, 1) },
+       { INT_RANGE(disabled, 0, 2) },
        { STR(id_str) },
 #ifdef CONFIG_IEEE80211W
        { INT_RANGE(ieee80211w, 0, 2) },
@@ -2138,6 +2144,7 @@ struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface,
        config->ap_scan = DEFAULT_AP_SCAN;
        config->fast_reauth = DEFAULT_FAST_REAUTH;
        config->p2p_go_intent = DEFAULT_P2P_GO_INTENT;
+       config->p2p_intra_bss = DEFAULT_P2P_INTRA_BSS;
        config->bss_max_count = DEFAULT_BSS_MAX_COUNT;
 
        if (ctrl_interface)
@@ -2376,10 +2383,10 @@ static const struct global_parse_data global_fields[] = {
 #ifdef CONFIG_WPS
        { FUNC(uuid), CFG_CHANGED_UUID },
        { STR_RANGE(device_name, 0, 32), CFG_CHANGED_DEVICE_NAME },
-       { STR_RANGE(manufacturer, 0, 64), 0 },
-       { STR_RANGE(model_name, 0, 32), 0 },
-       { STR_RANGE(model_number, 0, 32), 0 },
-       { STR_RANGE(serial_number, 0, 32), 0 },
+       { STR_RANGE(manufacturer, 0, 64), CFG_CHANGED_WPS_STRING },
+       { STR_RANGE(model_name, 0, 32), CFG_CHANGED_WPS_STRING },
+       { STR_RANGE(model_number, 0, 32), CFG_CHANGED_WPS_STRING },
+       { STR_RANGE(serial_number, 0, 32), CFG_CHANGED_WPS_STRING },
        { STR(device_type), CFG_CHANGED_DEVICE_TYPE },
        { FUNC(os_version), CFG_CHANGED_OS_VERSION },
        { STR(config_methods), CFG_CHANGED_CONFIG_METHODS },
@@ -2394,6 +2401,7 @@ static const struct global_parse_data global_fields[] = {
        { INT_RANGE(p2p_go_intent, 0, 15), 0 },
        { STR(p2p_ssid_postfix), CFG_CHANGED_P2P_SSID_POSTFIX },
        { INT_RANGE(persistent_reconnect, 0, 1), 0 },
+       { INT_RANGE(p2p_intra_bss, 0, 1), CFG_CHANGED_P2P_INTRA_BSS },
 #endif /* CONFIG_P2P */
        { FUNC(country), CFG_CHANGED_COUNTRY },
        { INT(bss_max_count), 0 },