>Synopsis: /etc/netstart fails to parse complex wpa2 passphrases >Category: system >Environment: System : OpenBSD 7.4 Details : OpenBSD 7.4 (GENERIC.MP) #2273: Tue Oct 10 09:45:06 MDT 2023 dera...@arm64.openbsd.org:/usr/src/sys/arch/ arm64/compile/GENERIC.MP
Architecture: OpenBSD.arm64 Machine : arm64 >Description: I have configured my Raspberry Pi to use its wlan interface using my access point information. The thing is... I have a 63 characters long passphrase. A complex one. It even uses characters that can trouble a shell : "!", "#", "\" and "&". After having edited /etc/hostname.bwfm0 with correct information, I used /etc/netstart to configure bwfm0. Without any success. On another AP I have nearby that uses a much more simple passphrase, the raspi could connect to it. Note that, in order to avoid netstart insulting me, I had to enclose the passphrase with quotes since it was obviously taken as-is in order to create the ifconfig command line. I could however connect to my AP directly using the command line. ifconfig bwfm0 join <myAP> wpakey '<my-long-and-complex-passphrase>' Starting netstart with the -n option showed that it was attempting to execute ifconfig with the same arguments... But the interface never got an IP address. Using my other AP to configure a similar passphrase yielded the same results. >How-To-Repeat: You have to have an AP with the wpa2 passphrase specified below. $ cat /etc/hostname.bwfm0 join mywifi wpakey 'B22c-2&0%snOy7!l+6vmpH&QMY#QT2BN1RPdeImAb0/ WkWc%-\&,HzGpJ7rbN5t' inet autoconf (do not worry : this passphrase has been changed since). $ doas sh /etc/netstart bwfm0 >Fix: I had to edit /etc/rc to add my ifconfig line just after the call to /etc/netstart. I hope this is only temporary :) dmesg: OpenBSD 7.4 (GENERIC.MP) #2273: Tue Oct 10 09:45:06 MDT 2023 dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP real mem = 4124950528 (3933MB) avail mem = 3961569280 (3778MB) random: good seed from bootblocks mainbus0 at root: Raspberry Pi 4 Model B Rev 1.1 efi0 at mainbus0: UEFI 2.8 efi0: Das U-Boot rev 0x20211000 smbios0 at efi0: SMBIOS 3.0 smbios0: vendor U-Boot version "2021.10" date 10/01/2021 smbios0: Unknown Unknown Product cpu0 at mainbus0 mpidr 0: ARM Cortex-A72 r0p3 cpu0: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache cpu0: 1024KB 64b/line 16-way L2 cache cpu0: CRC32,ASID16 cpu1 at mainbus0 mpidr 1: ARM Cortex-A72 r0p3 cpu1: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache cpu1: 1024KB 64b/line 16-way L2 cache cpu1: CRC32,ASID16 cpu2 at mainbus0 mpidr 2: ARM Cortex-A72 r0p3 cpu2: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache cpu2: 1024KB 64b/line 16-way L2 cache cpu2: CRC32,ASID16 cpu3 at mainbus0 mpidr 3: ARM Cortex-A72 r0p3 cpu3: 48KB 64b/line 3-way L1 PIPT I-cache, 32KB 64b/line 2-way L1 D-cache cpu3: 1024KB 64b/line 16-way L2 cache cpu3: CRC32,ASID16 "linux,cma" at mainbus0 not configured "nvram" at mainbus0 not configured apm0 at mainbus0 simplefb0 at mainbus0: 1680x1050, 32bpp wsdisplay0 at simplefb0 mux 1 wsdisplay0: screen 0-5 added (std, vt100 emulation) "system" at mainbus0 not configured "axi" at mainbus0 not configured simplebus0 at mainbus0: "soc" bcmclock0 at simplebus0 bcmmbox0 at simplebus0 bcmgpio0 at simplebus0 bcmaux0 at simplebus0 ampintc0 at simplebus0 nirq 256, ncpu 4 ipi: 0, 1, 2: "interrupt- controller" bcmtmon0 at simplebus0 bcmdmac0 at simplebus0: DMA0 DMA2 DMA4 DMA5 DMA6 DMA7 DMA8 DMA9 DMA10 "timer" at simplebus0 not configured pluart0 at simplebus0: rev 2, 16 byte fifo pluart0: console "local_intc" at simplebus0 not configured bcmdog0 at simplebus0 bcmirng0 at simplebus0 "firmware" at simplebus0 not configured "power" at simplebus0 not configured "mailbox" at simplebus0 not configured sdhc0 at simplebus0 sdhc0: SDHC 3.00, 250 MHz base clock sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed "gpiomem" at simplebus0 not configured "fb" at simplebus0 not configured "vcsm" at simplebus0 not configured "clocks" at mainbus0 not configured "phy" at mainbus0 not configured "clk-27M" at mainbus0 not configured "clk-108M" at mainbus0 not configured simplebus1 at mainbus0: "emmc2bus" sdhc1 at simplebus1 sdhc1: SDHC 3.00, 100 MHz base clock sdmmc1 at sdhc1: 8-bit, sd high-speed, mmc high-speed, ddr52, dma "arm-pmu" at mainbus0 not configured agtimer0 at mainbus0: 54000 kHz simplebus2 at mainbus0: "scb" bcmpcie0 at simplebus2 pci0 at bcmpcie0 ppb0 at pci0 dev 0 function 0 "Broadcom BCM2711" rev 0x10 pci1 at ppb0 bus 1 xhci0 at pci1 dev 0 function 0 "VIA VL805 xHCI" rev 0x01: intx, xHCI 1.0 usb0 at xhci0: USB revision 3.0 uhub0 at usb0 configuration 1 interface 0 "VIA xHCI root hub" rev 3.00/1.00 addr 1 bse0 at simplebus2: address dc:a6:32:5d:97:58 brgphy0 at bse0 phy 1: BCM54210E 10/100/1000baseT PHY, rev. 2 "dma" at simplebus2 not configured "hevc-decoder" at simplebus2 not configured "rpivid-local-intc" at simplebus2 not configured "h264-decoder" at simplebus2 not configured "vp9-decoder" at simplebus2 not configured gpioleds0 at mainbus0: "led0", "led1" "sd_io_1v8_reg" at mainbus0 not configured "sd_vcc_reg" at mainbus0 not configured "fixedregulator_3v3" at mainbus0 not configured "fixedregulator_5v0" at mainbus0 not configured simplebus3 at mainbus0: "v3dbus" "bootloader" at mainbus0 not configured scsibus0 at sdmmc1: 2 targets, initiator 0 sd0 at scsibus0 targ 1 lun 0: <SD/MMC, EC2QT, 0030> removable sd0: 61056MB, 512 bytes/sector, 125042688 sectors uhub1 at uhub0 port 1 configuration 1 interface 0 "VIA Labs USB2.0 Hub" rev 2.10/4.21 addr 2 bwfm0 at sdmmc0 function 1 manufacturer 0x02d0, product 0xa9a6 at sdmmc0 function 2 not configured manufacturer 0x02d0, product 0xa9a6 at sdmmc0 function 3 not configured uhub2 at uhub1 port 3 configuration 1 interface 0 "Genesys Logic USB2.0 Hub" rev 2.00/32.98 addr 3 uhidev0 at uhub2 port 1 configuration 1 interface 0 " RPI Wired Keyboard 2" rev 2.00/1.40 addr 4 uhidev0: iclass 3/1 ukbd0 at uhidev0: 8 variable keys, 6 key codes wskbd0 at ukbd0 mux 1 wskbd0: connecting to wsdisplay0 uhidev1 at uhub2 port 1 configuration 1 interface 1 " RPI Wired Keyboard 2" rev 2.00/1.40 addr 4 uhidev1: iclass 3/0 ucc0 at uhidev1: 9 usages, 8 keys, enum wskbd1 at ucc0 mux 1 wskbd1: connecting to wsdisplay0 uhidev2 at uhub1 port 4 configuration 1 interface 0 "Logitech Trackball" rev 1.10/2.20 addr 5 uhidev2: iclass 3/1 ums0 at uhidev2: 3 buttons, Z dir wsmouse0 at ums0 mux 0 vscsi0 at root scsibus1 at vscsi0: 256 targets softraid0 at root scsibus2 at softraid0: 256 targets root on sd0a (c5266df9f1fa29ce.a) swap on sd0b dump on sd0b WARNING: CHECK AND RESET THE DATE! gpio0 at bcmgpio0: 58 pins bwfm0: address dc:a6:32:5d:97:59 usbdevs: Controller /dev/usb0: addr 01: 1106:0000 VIA, xHCI root hub super speed, self powered, config 1, rev 1.00 driver: uhub0 addr 02: 2109:3431 VIA Labs, USB2.0 Hub high speed, self powered, config 1, rev 4.21 driver: uhub1 addr 03: 05e3:0610 Genesys Logic, USB2.0 Hub high speed, self powered, config 1, rev 32.98 driver: uhub2 addr 04: 04d9:0006 , RPI Wired Keyboard 2 low speed, power 100 mA, config 1, rev 1.40 driver: uhidev0 driver: uhidev1 addr 05: 046d:c404 Logitech, Trackball low speed, power 100 mA, config 1, rev 2.20 driver: uhidev2