~indicator-network-developers/wpasupplicant/07-series.packaging

« back to all changes in this revision

Viewing changes to src/wps/wps_attr_process.c

  • Committer: Jouni Malinen
  • Author(s): Jouni Malinen
  • Date: 2010-06-11 21:17:05 UTC
  • Revision ID: git-v1:d0b91133740078dcf8479c84389cbb163dc3a42a
WPS: Add workaround for missing Network Key attribute

Some deployed implementations do not include the mandatory Network
Key attribute when a WPS Credential is for an open network. Allow
this to improve interoperability since the actual key value is not
really needed for open networks.
(cherry picked from commit 9abe9b2c358cc0bb7a2f924524dbc1a4211bd306)

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
        if (key == NULL) {
178
178
                wpa_printf(MSG_DEBUG, "WPS: Credential did not include "
179
179
                           "Network Key");
 
180
                if (cred->auth_type == WPS_AUTH_OPEN &&
 
181
                    cred->encr_type == WPS_ENCR_NONE) {
 
182
                        wpa_printf(MSG_DEBUG, "WPS: Workaround - Allow "
 
183
                                   "missing mandatory Network Key attribute "
 
184
                                   "for open network");
 
185
                        return 0;
 
186
                }
180
187
                return -1;
181
188
        }
182
189