]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
hostapd: fix ascii check and add country code to hostapd.conf.
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 28 Feb 2013 23:06:51 +0000 (00:06 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 28 Feb 2013 23:06:51 +0000 (00:06 +0100)
html/cgi-bin/wlanap.cgi
lfs/hostapd

index ce8f051aa7cc944cd80c7a82a9089ed3f97495de..58c6376feac996a2bdb018370bdc0e63ce9cf48e 100644 (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
 ;
index 690f138b792620f07a9dc1a5e4b421bd5d602fb1..ff02a1991404dd901b3398d0aab80d2e4206757c 100644 (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       = ""