Fix generated WPS PIN values to use zero-padding
The dynamically generated PINs are supposed to have 8 digits, but some PIN generatation cases were not zero-padding these properly.
This commit is contained in:
parent
47662f4017
commit
9337e876ab
2 changed files with 3 additions and 3 deletions
|
@ -1350,7 +1350,7 @@ const char * hostapd_wps_ap_pin_random(struct hostapd_data *hapd, int timeout)
|
|||
struct wps_ap_pin_data data;
|
||||
|
||||
pin = wps_generate_pin();
|
||||
os_snprintf(data.pin_txt, sizeof(data.pin_txt), "%u", pin);
|
||||
os_snprintf(data.pin_txt, sizeof(data.pin_txt), "%08u", pin);
|
||||
data.timeout = timeout;
|
||||
hostapd_wps_for_each(hapd, wps_ap_pin_set, &data);
|
||||
return hapd->conf->ap_pin;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue