fix: Recovery-Rettungsweg härten (Watchdog-Cap, Konsole, Softap-Bit, Scan-Retry)

This commit is contained in:
Michael Sauer
2026-09-12 02:38:02 +02:00
parent 8fa4af7eb5
commit 247d610fe8
5 changed files with 85 additions and 16 deletions
+9 -2
View File
@@ -44,9 +44,16 @@ endif()
if(NOT DEFINED NINLIGHT_RECOVERY_PASSWORD)
set(NINLIGHT_RECOVERY_PASSWORD "ninlight-recovery")
endif()
# Unlike NINLIGHT_WIFI_SSID, the recovery SSID is compared byte-for-byte against scan
# results (nl_recovery.c) and must fit struct tls_bss_info_t::ssid[32]; empty would match
# any hidden/empty-SSID AP in the scan, so it must not be empty either.
string(LENGTH "${NINLIGHT_RECOVERY_SSID}" _nl_rec_ssid_len)
if(_nl_rec_ssid_len EQUAL 0 OR _nl_rec_ssid_len GREATER 32)
message(FATAL_ERROR "NINLIGHT_RECOVERY_SSID must be 1..32 characters")
endif()
string(LENGTH "${NINLIGHT_RECOVERY_PASSWORD}" _nl_rec_len)
if(_nl_rec_len LESS 8)
message(FATAL_ERROR "NINLIGHT_RECOVERY_PASSWORD needs at least 8 characters (WPA2)")
if(_nl_rec_len LESS 8 OR _nl_rec_len GREATER 63)
message(FATAL_ERROR "NINLIGHT_RECOVERY_PASSWORD must be 8..63 characters (WPA2)")
endif()
foreach(_v NINLIGHT_WIFI_SSID NINLIGHT_WIFI_PASSWORD NINLIGHT_AP_PASSWORD NINLIGHT_TOKEN
NINLIGHT_RECOVERY_SSID NINLIGHT_RECOVERY_PASSWORD)