From f62b410aaa688544eb3993f575c84017ad184f57 Mon Sep 17 00:00:00 2001 From: oblique Date: Sat, 23 May 2015 20:55:53 +0300 Subject: [PATCH] Allow empty PSK (i.e. open network) --- create_ap | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/create_ap b/create_ap index 609e73e..3f1eda5 100755 --- 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