]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Comment out unused AP WEP config write with WPS 2.0
authorJouni Malinen <j@w1.fi>
Sat, 22 Mar 2014 21:31:39 +0000 (23:31 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 22 Mar 2014 21:31:39 +0000 (23:31 +0200)
The main WPS code rejects WEP parameters, so this code is not used and
can be commented out from WPS 2.0 builds. This is similar to the earlier
commit that commented out in-memory update.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/wps_hostapd.c

index 787d2be527748c5d152bc3ee7842364ea9965909..e0033cedf3cda4028ba8221f8929495dc499c624 100644 (file)
@@ -594,6 +594,13 @@ static int hapd_wps_cred_cb(struct hostapd_data *hapd, void *ctx)
 
                fprintf(nconf, "auth_algs=1\n");
        } else {
+#ifdef CONFIG_WPS2
+               /*
+                * WPS 2.0 does not allow WEP to be configured, so no need to
+                * process that option here either.
+                */
+               fprintf(nconf, "auth_algs=1\n");
+#else /* CONFIG_WPS2 */
                if ((cred->auth_type & WPS_AUTH_OPEN) &&
                    (cred->auth_type & WPS_AUTH_SHARED))
                        fprintf(nconf, "auth_algs=3\n");
@@ -619,6 +626,7 @@ static int hapd_wps_cred_cb(struct hostapd_data *hapd, void *ctx)
                        }
                        fprintf(nconf, "\n");
                }
+#endif /* CONFIG_WPS2 */
        }
 
        fprintf(nconf, "# WPS configuration - END\n");