How to disable SSID escaping (send raw bytes sequence) when sending RADIUS data to RADIUS server?

Jouni Malinen j at
Thu Dec 24 02:04:56 PST 2015

On Thu, Dec 24, 2015 at 01:29:58PM +0800, LiuYan 刘研 wrote:
> I'm currently using hostapd and FreeRADIUS to setup several WiFi APs using WPA2-Enterprise authentication protocol.
> I saw all Called-Station-Id values are escaped to printf-escaped string.
> For example, a UTF-8 encoded SSID name "中文😂"(10 bytes) will be escaped to
> '\xe4\xb8\xad\xe6\x96\x87\xf0\x9f\x98\x82' (40 bytes).

That does not sound like something that was done on purpose. I would
have expected the SSID to be used as an array of binary octets here..

> So, can I config hostapd to disable SSID escaping (send raw bytes sequences) when sending data to RADIUS server?

There is no (and should not be a) configuration parameter for this since
that should really be the behavior anyway. It looks like this got
changed by accident as a combination of commit
986de33d5c3e11dd08a26ed65eacede8b75aa339 ('Convert remaining SSID
routines from char* to u8*') and commit
6bc1f95613cc2bedd8849564d30419bff82ed074 ('Use printf escaping in
SSID-to-printable-string conversion').

I'll restore the old behavior (or well, I'll make it support the
unlikely, but possible, case of 0x00 being included in the SSID, which
is something that the older implementation did not support.

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list