]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS: Set correct Device Password ID in M2
authorAndriy Tkachuk <andriy.tkachuk@inobject.com>
Fri, 6 Feb 2009 12:03:34 +0000 (14:03 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 6 Feb 2009 12:03:34 +0000 (14:03 +0200)
It looks like we don't set correspondent Device Password ID attribute in
M2 message during PBC registration. Without it TG185n STA was not able
to connect to our AP in PBC mode. Attached patch fixes this.

src/wps/wps_registrar.c

index 249068211f1f4879ee4bddcff60dc26258cef3a6..0fcc9ac5ae0008c22ace66f64d7181263022c133 100644 (file)
@@ -1117,7 +1117,7 @@ static struct wpabuf * wps_build_m2(struct wps_data *wps)
            wps_build_rf_bands(&wps->wps->dev, msg) ||
            wps_build_assoc_state(wps, msg) ||
            wps_build_config_error(msg, WPS_CFG_NO_ERROR) ||
-           wps_build_dev_password_id(msg, DEV_PW_DEFAULT) ||
+           wps_build_dev_password_id(msg, wps->dev_pw_id) ||
            wps_build_os_version(&wps->wps->dev, msg) ||
            wps_build_authenticator(wps, msg)) {
                wpabuf_free(msg);