WPS: Include all Config Methods in Probe Request
Do not use active PBC state to figure out which ConfigMethods are included in Probe Request; instead, include all supported ones.
This commit is contained in:
parent
5e8b237864
commit
d19f5fc881
1 changed files with 18 additions and 21 deletions
|
@ -435,7 +435,7 @@ struct wpabuf * wps_build_probe_req_ie(int pbc, struct wps_device_data *dev,
|
||||||
enum wps_request_type req_type)
|
enum wps_request_type req_type)
|
||||||
{
|
{
|
||||||
struct wpabuf *ie;
|
struct wpabuf *ie;
|
||||||
u16 methods;
|
u16 methods = 0;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "WPS: Building WPS IE for Probe Request");
|
wpa_printf(MSG_DEBUG, "WPS: Building WPS IE for Probe Request");
|
||||||
|
|
||||||
|
@ -443,23 +443,21 @@ struct wpabuf * wps_build_probe_req_ie(int pbc, struct wps_device_data *dev,
|
||||||
if (ie == NULL)
|
if (ie == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (pbc) {
|
methods |= WPS_CONFIG_PUSHBUTTON;
|
||||||
methods = WPS_CONFIG_PUSHBUTTON;
|
|
||||||
#ifdef CONFIG_WPS2
|
#ifdef CONFIG_WPS2
|
||||||
/*
|
/*
|
||||||
* TODO: At least in theory, should figure out whether this
|
* TODO: Should figure out whether this device has a physical or
|
||||||
* Probe Request was triggered with physical or virtual
|
* virtual pushbutton.
|
||||||
* pushbutton.
|
|
||||||
*/
|
*/
|
||||||
methods |= WPS_CONFIG_VIRT_PUSHBUTTON;
|
methods |= WPS_CONFIG_VIRT_PUSHBUTTON;
|
||||||
#endif /* CONFIG_WPS2 */
|
#endif /* CONFIG_WPS2 */
|
||||||
} else {
|
|
||||||
/*
|
/*
|
||||||
* TODO: At least in theory, should figure out whether this
|
* TODO: Should figure out whether this Probe Request was triggered
|
||||||
* Probe Request was triggered using physical or virtual
|
* using physical or virtual display. Also, if the device has a PIN on
|
||||||
* display.
|
* a label, that should be indicated here.
|
||||||
*/
|
*/
|
||||||
methods = WPS_CONFIG_LABEL | WPS_CONFIG_DISPLAY |
|
methods |= WPS_CONFIG_DISPLAY |
|
||||||
#ifdef CONFIG_WPS2
|
#ifdef CONFIG_WPS2
|
||||||
WPS_CONFIG_VIRT_DISPLAY |
|
WPS_CONFIG_VIRT_DISPLAY |
|
||||||
#endif /* CONFIG_WPS2 */
|
#endif /* CONFIG_WPS2 */
|
||||||
|
@ -470,7 +468,6 @@ struct wpabuf * wps_build_probe_req_ie(int pbc, struct wps_device_data *dev,
|
||||||
#ifdef CONFIG_WPS_NFC
|
#ifdef CONFIG_WPS_NFC
|
||||||
methods |= WPS_CONFIG_NFC_INTERFACE;
|
methods |= WPS_CONFIG_NFC_INTERFACE;
|
||||||
#endif /* CONFIG_WPS_NFC */
|
#endif /* CONFIG_WPS_NFC */
|
||||||
}
|
|
||||||
|
|
||||||
if (wps_build_version(ie) ||
|
if (wps_build_version(ie) ||
|
||||||
wps_build_req_type(ie, req_type) ||
|
wps_build_req_type(ie, req_type) ||
|
||||||
|
|
Loading…
Reference in a new issue