]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix WPS IE in Probe Response frame to include proper Config Methods values
authorJouni Malinen <j@w1.fi>
Sat, 13 Mar 2010 11:39:22 +0000 (13:39 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 13 Mar 2010 11:39:22 +0000 (13:39 +0200)
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.

src/wps/wps_registrar.c

index 30283fe7fb6cfbd47a0b30b4261839c0113a66ec..2399d1c880e4e5d02bb288b9300b2cc747b634f3 100644 (file)
@@ -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);