hostapd: fix ascii check and add country code to hostapd.conf.

This commit is contained in:
Arne Fitzenreiter
2013-03-01 00:06:51 +01:00
parent 2ae5ed5db0
commit cdbeabe221
2 changed files with 5 additions and 3 deletions

View File

@@ -131,7 +131,7 @@ if ( $wlanapsettings{'ACTION'} eq "$Lang::tr{'save'}" ){
$errormessage .= "$Lang::tr{'wlanap invalid wpa'}<br />";
}
# only ASCII alowed
if ( ($wlanapsettings{'PWD'} !~ m/[\x00-\x7f]/) ){
if ( !($wlanapsettings{'PWD'} !~ /[^\x00-\x7f]/) ){
$errormessage .= "$Lang::tr{'wlanap invalid wpa'}<br />";
}
}
@@ -529,10 +529,12 @@ sub WriteConfig_hostapd{
open (CONFIGFILE, ">/var/ipfire/wlanap/hostapd.conf");
print CONFIGFILE <<END
driver=$wlanapsettings{'DRIVER_HOSTAPD'}
######################### basic hostapd configuration ##########################
#
interface=$wlanapsettings{'INTERFACE'}
driver=$wlanapsettings{'DRIVER_HOSTAPD'}
country_code=$wlanapsettings{'COUNTRY'}
ieee80211d=1
channel=$wlanapsettings{'CHANNEL'}
END
;

View File

@@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = hostapd
PAK_VER = 25
PAK_VER = 26
DEPS = ""