[patch] WPS: hostapd fails to proxy registrations with Intel ext. registrar

Jouni Malinen j
Wed Mar 31 09:34:30 PDT 2010


On Wed, Mar 31, 2010 at 09:53:11AM +0300, Andriy Tkachuk wrote:

> I used here the Intel card and SW (driver & Intel PROSet application)
> versions from WFA testbed...

Interesting.. I have not seen this in my tests, but maybe I have only
tested with different PROset versions.

> 1269872027.309206: WPS UPnP: Got HTTP request type 4 from 192.168.1.111:60057
> 1269872027.309228: WPS UPnP: PutWLANResponse
> 1269872027.309259: WPS UPnP: POST failure ret=600
> 
> This failure, as appeared, happened on parsing the NewWLANEventMAC value
> in web_process_put_wlan_response() here:
> 
>         val = xml_get_first_item(data, "NewWLANEventMAC");
>         if (val == NULL || hwaddr_aton(val, macaddr)) {
>                 wpabuf_free(msg);
>                 os_free(val);
>                 return UPNP_ARG_VALUE_INVALID;
>         }

OK. I would prefer this to be worked around in more visible way, i.e.,
something like (completely untested; hwaddr_aton_dots would be the new
function handling the incorrect format that was used by the ER).

val = xml_get_first_item(data, "NewWLANEventMAC");
if (val) {
	if (hwaddr_aton(val, macaddr)) {
	    wpa_printf(MSG_DEBUG, "WPS: Invalid NewWLANEventMAC '%s'",
		       val);
	    if (hwaddr_aton_dots(val, macaddr)) {
		os_free(val);
		val = NULL;
	    } else
		wpa_printf(MSG_DEBUG, "WPS: Workaround - accepted "
			   "incorrect NewWLANEventMAC format");
	}
}
if (val == NULL) {
	wpabuf_free(msg);
	return UPNP_ARG_VALUE_INVALID;
}
os_free(val);

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list