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

Andriy Tkachuk andrit at ukr.net
Tue Mar 30 10:08:37 EDT 2010


Hello Jouni & Co.

It appeared that clients can't enroll to the AP when hostapd works as
proxy and Intel is used as external wireless registrar. In particular
this affects the 4.2.3 test case from WFA WPS testplan. Debugging it
reveled that Intel sends the MAC address in non standard format (in
NewWLANEventMAC UPnP xml tag). The bytes in address are separated with
dots instead of colons, for example, like 00.aa.bb.cc.dd.ee (instead of
00:aa:bb:cc:dd:ee, as it should be according to WFA WLANConfig 1_0
Template 1_01.pdf spec). The following patch, that makes hwaddr_aton()
routine more tolerant for address format, fixes the issue:

--- a/src/utils/common.c
+++ b/src/utils/common.c
@@ -62,8 +62,9 @@ int hwaddr_aton(const char *txt, u8 *addr)
 		if (b < 0)
 			return -1;
 		*addr++ = (a << 4) | b;
-		if (i < 5 && *txt++ != ':')
+		if (i < 5 && *txt != ':' && *txt != '.')
 			return -1;
+		txt++;
 	}
 
 	return 0;

(The bug affects current 0.7 and stable 0.6 branches.)

Regards,
    Andriy


More information about the HostAP mailing list