P2P: Add Device Name into WPS IE in Probe Request frames
[libeap.git] / src / wps / wps_registrar.c
index 7f26306..03023b0 100644 (file)
@@ -1056,6 +1056,15 @@ static int wps_set_ie(struct wps_registrar *reg)
                return -1;
        }
 
+#ifdef CONFIG_P2P
+       if (wps_build_dev_name(&reg->wps->dev, beacon) ||
+           wps_build_primary_dev_type(&reg->wps->dev, beacon)) {
+               wpabuf_free(beacon);
+               wpabuf_free(probe);
+               return -1;
+       }
+#endif /* CONFIG_P2P */
+
        beacon = wps_ie_encapsulate(beacon);
        probe = wps_ie_encapsulate(probe);