[PATCH] Reset the ssid in wps before being replaced with the one in credential.
Fri Dec 9 13:50:46 PST 2011
Hi Jouni and Johannes,
Yes, I am trying to fix a bug related to generating random WPS ssid for
each band, and thought this kind of change maybe necessary even without
that random WPS ssid modification.
However, I seems to misunderstand how to use that SSID buffer. I will check
Thanks for your responses. :)
2011/12/10 Jouni Malinen <j at w1.fi>
> On Fri, Dec 09, 2011 at 01:10:10PM +0800, jungwalk at gmail.com wrote:
> > It is better to reset the ssid in WPS first before it is replaced with
> the one in
> > credential in case the length of ssid in credential is longer than
> Are you trying to fix a bug that addresses some noticeable issue?
> > @@ -318,6 +318,7 @@ static int hapd_wps_cred_cb(struct hostapd_data
> *hapd, void *ctx)
> > + os_memset(hapd->wps->ssid, 0, HOSTAPD_MAX_SSID_LEN);
> > os_memcpy(hapd->wps->ssid, cred->ssid, cred->ssid_len);
> > hapd->wps->ssid_len = cred->ssid_len;
> Like Johannes pointed out, this should not really result in any real
> change in actual behavior. If it does, there is likely a real bug
> somewhere else and that should be fixed. The SSID buffer is used as an
> arbitrary binary array of ssid_len octets and as such, there is no need
> to null-terminate it - the extra octets in the buffer are ignored.
> Jouni Malinen PGP id EFC895FA
> HostAP mailing list
> HostAP at lists.shmoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Hostap