aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-03-13 11:39:22 (GMT)
committerJouni Malinen <j@w1.fi>2010-03-13 11:39:22 (GMT)
commitbdda27eb171893aaa8bf2f574fca517facda176b (patch)
treeb22eae61df4ef19cf14c4d667cb0478b3b6a4cf6 /src
parenta7918ec7490022051ffc89600ab82bc5b6eed0f3 (diff)
downloadhostap-bdda27eb171893aaa8bf2f574fca517facda176b.zip
hostap-bdda27eb171893aaa8bf2f574fca517facda176b.tar.gz
hostap-bdda27eb171893aaa8bf2f574fca517facda176b.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.
Diffstat (limited to 'src')
-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 30283fe..2399d1c 100644
--- a/src/wps/wps_registrar.c
+++ b/src/wps/wps_registrar.c
@@ -402,7 +402,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);