WPS 2.0: Fix strict mode validation of UPnP MAC Address format
authorJouni Malinen <jouni.malinen@atheros.com>
Thu, 22 Jul 2010 20:29:52 +0000 (13:29 -0700)
committerJouni Malinen <j@w1.fi>
Thu, 9 Sep 2010 13:07:49 +0000 (06:07 -0700)
This was supposed to only reject the message from WPS 2.0 ER, not from
WPS 1.0 ER.

src/wps/wps_upnp_web.c

index 1a52798..250ad8e 100644 (file)
@@ -532,7 +532,7 @@ web_process_put_wlan_response(struct upnp_wps_device_sm *sm, char *data,
                                return UPNP_ARG_VALUE_INVALID;
                        }
                }
-#else /* CONFIG_WPS_STRICT */
+#endif /* CONFIG_WPS_STRICT */
                if (hwaddr_aton2(val, macaddr) > 0) {
                        /*
                         * At least some versions of Intel PROset seem to be
@@ -540,13 +540,13 @@ web_process_put_wlan_response(struct upnp_wps_device_sm *sm, char *data,
                         */
                        wpa_printf(MSG_DEBUG, "WPS UPnP: Workaround - allow "
                                   "incorrect MAC address format in "
-                                  "NewWLANEventMAC");
+                                  "NewWLANEventMAC: %s -> " MACSTR,
+                                  val, MAC2STR(macaddr));
                } else {
                        wpabuf_free(msg);
                        os_free(val);
                        return UPNP_ARG_VALUE_INVALID;
                }
-#endif /* CONFIG_WPS_STRICT */
        }
        os_free(val);
        if (ev_type == UPNP_WPS_WLANEVENT_TYPE_EAP) {