aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-03-13 11:39:22 (GMT)
committerJouni Malinen <j@w1.fi>2010-08-28 12:59:17 (GMT)
commitfb91cf5b56b43344bb6dfe208c458f2ffb253377 (patch)
treeb39da40619309c10d3b68ac39769593b55fc0778
parent8fac32f5efa7a7c3fc6eee8d3723a09e7abe27fa (diff)
downloadhostap-06-fb91cf5b56b43344bb6dfe208c458f2ffb253377.zip
hostap-06-fb91cf5b56b43344bb6dfe208c458f2ffb253377.tar.gz
hostap-06-fb91cf5b56b43344bb6dfe208c458f2ffb253377.tar.bz2
Fix WPS IE in Probe Response frame to include proper Config Methods values
This attribute is supposed to indicate which methods the AP supports as an Enrollee for adding external Registrars. It was left to 0 when the AP code did not yet support external Registrars and was forgotten when the ER support was added. (cherry picked from commit bdda27eb171893aaa8bf2f574fca517facda176b)
-rw-r--r--src/wps/wps_registrar.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c
index f34c9e9..f2b2980 100644
--- a/src/wps/wps_registrar.c
+++ b/src/wps/wps_registrar.c
@@ -314,7 +314,11 @@ static int wps_build_probe_config_methods(struct wps_registrar *reg,
struct wpabuf *msg)
{
u16 methods;
- methods = 0;
+ /*
+ * These are the methods that the AP supports as an Enrollee for adding
+ * external Registrars.
+ */
+ methods = reg->wps->config_methods & ~WPS_CONFIG_PUSHBUTTON;
wpa_printf(MSG_DEBUG, "WPS: * Config Methods (%x)", methods);
wpabuf_put_be16(msg, ATTR_CONFIG_METHODS);
wpabuf_put_be16(msg, 2);