RPi-Distro / pi-gen

Tool used to create the official Raspberry Pi OS images
BSD 3-Clause "New" or "Revised" License
2.62k stars 1.64k forks source link

SSID max length validation #617

Open CodeTherapist opened 2 years ago

CodeTherapist commented 2 years ago

Accordingly to Service set (802.11 network) is the max length of an SSID zero to 32 octets (32 bytes) long.

When the length exceeds the max length, the wlan services are not functional.

sudo wpa_cli

wpa_cli v2.9
Copyright (c) 2004-2019, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.
See README for more details.

Interactive mode

Could not connect to wpa_supplicant: (nil) - re-trying

sudo strace wpa_cli

openat(AT_FDCWD, "/var/run/wpa_supplicant", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
clock_gettime64(CLOCK_BOOTTIME, {tv_sec=1976, tv_nsec=156586834}) = 0
clock_gettime64(CLOCK_BOOTTIME, {tv_sec=1976, tv_nsec=156867291}) = 0
_newselect(1, [], [], [], {tv_sec=0, tv_usec=999719}) = 0 (Timeout)
clock_gettime64(CLOCK_BOOTTIME, {tv_sec=1977, tv_nsec=158229042}) = 0

This could be validated by the pi-gen build. The same way as done for the password. I would willingly do a PR for that, if I get green light from you to do so 😎

XECDesign commented 2 years ago

Hey, sorry about the delay.

Yes, I'd be happy to merge a PR that fixes this.