mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
wpa_supplicant: WPS Inter operatability Fixes
Add WPS IOT fixes under config option Current fixes under this flag. 1. Allow NULL-padded WPS attributes. 2. Bypass WPS-Config method validation
This commit is contained in:
parent
c643d0a611
commit
76335b2558
@ -29,4 +29,23 @@ menu "Supplicant"
|
|||||||
help
|
help
|
||||||
Select this to enable TLS v1.2 for WPA2-Enterprise Authentication.
|
Select this to enable TLS v1.2 for WPA2-Enterprise Authentication.
|
||||||
|
|
||||||
|
config WPA_WPS_WARS
|
||||||
|
bool "Add WPS Inter operatability Fixes"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Select this option to enable WPS related IOT fixes with
|
||||||
|
different APs. This option fixes IOT related issues with
|
||||||
|
APs which do not follow some of the standards of WPS-2.0
|
||||||
|
specification. These do not include any of the security
|
||||||
|
related bypassing, just simple configuration corrections.
|
||||||
|
|
||||||
|
Current fixes under this flag.
|
||||||
|
1. Allow NULL-padded WPS attributes: Some APs keep NULL-padding
|
||||||
|
at the end of some variable length WPS Attributes.
|
||||||
|
This is not as par the WPS2.0 specs, but to avoid interop issues,
|
||||||
|
ignore the padding by reducing the attribute length by 1.
|
||||||
|
2. Bypass WPS-Config method validation: Some APs set display/pbc
|
||||||
|
button bit without setting virtual/phycial display/button bit which
|
||||||
|
will cause M2 validation fail, bypassing WPS-Config method validation.
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@ -134,6 +134,7 @@ static u16 wps_ignore_null_padding_in_attr(const u8 *pos, u16 type, u16 attr_dat
|
|||||||
|
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
#ifdef CONFIG_WPA_WPS_WARS
|
||||||
/*
|
/*
|
||||||
* Some AP's keep NULL-padding at the end of some variable length WPS Attributes.
|
* Some AP's keep NULL-padding at the end of some variable length WPS Attributes.
|
||||||
* This is not as par the WPS2.0 specs, but to avoid interop issues, ignore the
|
* This is not as par the WPS2.0 specs, but to avoid interop issues, ignore the
|
||||||
@ -153,6 +154,7 @@ static u16 wps_ignore_null_padding_in_attr(const u8 *pos, u16 type, u16 attr_dat
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,7 @@ static int wps_validate_response_type(const u8 *response_type, int mandatory)
|
|||||||
|
|
||||||
static int valid_config_methods(u16 val, int wps2)
|
static int valid_config_methods(u16 val, int wps2)
|
||||||
{
|
{
|
||||||
|
#ifndef CONFIG_WPA_WPS_WARS
|
||||||
if (wps2) {
|
if (wps2) {
|
||||||
if (!(val & 0x6000) && (val & WPS_CONFIG_DISPLAY)) {
|
if (!(val & 0x6000) && (val & WPS_CONFIG_DISPLAY)) {
|
||||||
wpa_printf(MSG_INFO, "WPS-STRICT: Display flag "
|
wpa_printf(MSG_INFO, "WPS-STRICT: Display flag "
|
||||||
@ -108,6 +109,7 @@ static int valid_config_methods(u16 val, int wps2)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user