commit f62b410aaa688544eb3993f575c84017ad184f57
parent b47b321763327e4b50cf1433376c7abfb6e6e0b3
Author: oblique <psyberbits@gmail.com>
Date: Sat, 23 May 2015 20:55:53 +0300
Allow empty PSK (i.e. open network)
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/create_ap b/create_ap
@@ -1127,9 +1127,7 @@ if [[ $USE_PSK -eq 0 ]]; then
echo "ERROR: Invalid passphrase length ${#PASSPHRASE} (expected 8..63)" >&2
exit 1
fi
-fi
-
-if [[ $USE_PSK -eq 1 && ${#PASSPHRASE} -ne 64 ]]; then
+elif [[ ${#PASSPHRASE} -gt 0 && ${#PASSPHRASE} -ne 64 ]]; then
echo "ERROR: Invalid pre-shared-key length ${#PASSPHRASE} (expected 64)" >&2
exit 1
fi