create_ap

create a nat-ed wifi ap
git clone git://git.2f30.org/create_ap
Log | Files | Refs | README | LICENSE

commit 04fa4860d11bee53fa4ce185a3bcff5d75ba6bbf
parent b750e70de6c41ea65533cc60b13a6b0297c4ce41
Author: oblique <psyberbits@gmail.com>
Date:   Wed,  4 Mar 2015 23:50:27 +0200

Use `-w 2' with rtl* drivers

Diffstat:
Mcreate_ap | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/create_ap b/create_ap @@ -594,6 +594,7 @@ while :; do -w) shift WPA_VERSION="$1" + [[ "$WPA_VERSION" == "2+1" ]] && WPA_VERSION=1+2 shift ;; -g) @@ -859,6 +860,14 @@ if [[ ${#PASSPHRASE} -gt 0 && ${#PASSPHRASE} -lt 8 ]] || [[ ${#PASSPHRASE} -gt 6 exit 1 fi +if [[ $(get_adapter_kernel_module ${WIFI_IFACE}) =~ ^rtl[0-9].*$ ]]; then + if [[ -n "$PASSPHRASE" ]]; then + echo "WARN: Realtek drivers usually have problems with WPA1, enabling -w 2" >&2 + WPA_VERSION=2 + fi + echo "WARN: If AP doesn't work, please read: howto/realtek.md" >&2 +fi + if [[ "$SHARE_METHOD" == "bridge" ]]; then if [[ -e /proc/sys/net/bridge/bridge-nf-call-iptables ]]; then OLD_BRIDGE_IPTABLES=$(cat /proc/sys/net/bridge/bridge-nf-call-iptables) @@ -978,7 +987,7 @@ EOF fi if [[ -n "$PASSPHRASE" ]]; then - [[ "$WPA_VERSION" == "1+2" || "$WPA_VERSION" == "2+1" ]] && WPA_VERSION=3 + [[ "$WPA_VERSION" == "1+2" ]] && WPA_VERSION=3 cat << EOF >> $CONFDIR/hostapd.conf wpa=${WPA_VERSION} wpa_passphrase=$PASSPHRASE