public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <git@ipfire.org>
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. f00b2fa7782e2dc16a2653cc006b77bb1bdbee3d
Date: Fri, 16 Aug 2024 15:18:48 +0000	[thread overview]
Message-ID: <4Wlly02VcZz2xT1@people01.haj.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 71528 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".

The branch, next has been updated
       via  f00b2fa7782e2dc16a2653cc006b77bb1bdbee3d (commit)
       via  9b1225603f639b995a3f5ba6f6760579ca5121d3 (commit)
       via  1674ec72052f7d32b3583737c0c6673fd3571c72 (commit)
      from  33a2aff4168db7554ce26b574443bcb2dc58434d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f00b2fa7782e2dc16a2653cc006b77bb1bdbee3d
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Fri Aug 16 15:18:18 2024 +0000

    wlanap.cgi: Always advertise TPC, support UTF-8 SSIDs
    
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>

commit 9b1225603f639b995a3f5ba6f6760579ca5121d3
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Fri Aug 16 15:10:29 2024 +0000

    wlanap.cgi: Refactor the entire thing
    
    This went really bad with the latest CSS changes. So this is a
    refactor/rewrite of the CGI without many modifications.
    
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>

commit 1674ec72052f7d32b3583737c0c6673fd3571c72
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date:   Fri Aug 16 13:05:25 2024 +0000

    suricata: Disable logging of App Layer events by default
    
    This might only be useful for debugging (and even that is questionable).
    So instead of flooding logs, we disable this, but it can be easily
    enabled for development again.
    
    Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>

-----------------------------------------------------------------------

Summary of changes:
 config/cfgroot/ids-functions.pl               |  47 +-
 config/menu/EX-wlanap.menu                    |   4 +-
 doc/language_issues.de                        |  14 +
 doc/language_issues.en                        |  28 +-
 doc/language_issues.es                        |  16 +-
 doc/language_issues.fr                        |  14 +
 doc/language_issues.it                        |  22 +-
 doc/language_issues.nl                        |  22 +-
 doc/language_issues.pl                        |  22 +-
 doc/language_issues.ru                        |  22 +-
 doc/language_issues.tr                        |  18 +-
 doc/language_missings                         |  24 +
 html/cgi-bin/wlanap.cgi                       | 790 +++++++++++---------------
 html/html/themes/ipfire/include/css/style.css |   4 +
 langs/en/cgi-bin/en.pl                        |  27 +-
 15 files changed, 532 insertions(+), 542 deletions(-)

Difference in files:
diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl
index 3eb883aa9..399f5cbf8 100644
--- a/config/cfgroot/ids-functions.pl
+++ b/config/cfgroot/ids-functions.pl
@@ -152,6 +152,9 @@ my @http_ports = ('80', '81');
 # Array which contains a list of rulefiles which always will be included if they exist.
 my @static_included_rulefiles = ('local.rules', 'whitelist.rules');
 
+# Log App Layer Events? (Useful for debugging only)
+my $LOG_APP_LAYER_EVENTS = 0;
+
 # Array which contains a list of allways enabled application layer protocols.
 my @static_enabled_app_layer_protos = ('app-layer', 'decoder', 'files', 'stream');
 
@@ -1437,31 +1440,33 @@ sub write_used_rulefiles_file (@) {
 		}
 	}
 
-	print FILE "\n#Default rules for used application layer protocols.\n";
-	foreach my $enabled_app_layer_proto (@enabled_app_layer_protos) {
-		# Check if the current processed app layer proto needs to be translated
-		# into an application name.
-		if (exists($tr_app_layer_proto{$enabled_app_layer_proto})) {
-			# Obtain the translated application name for this protocol.
-			$enabled_app_layer_proto = $tr_app_layer_proto{$enabled_app_layer_proto};
-		}
+	if ($LOG_APP_LAYER_EVENTS) {
+		print FILE "\n#Default rules for used application layer protocols.\n";
+		foreach my $enabled_app_layer_proto (@enabled_app_layer_protos) {
+			# Check if the current processed app layer proto needs to be translated
+			# into an application name.
+			if (exists($tr_app_layer_proto{$enabled_app_layer_proto})) {
+				# Obtain the translated application name for this protocol.
+				$enabled_app_layer_proto = $tr_app_layer_proto{$enabled_app_layer_proto};
+			}
 
-		# Generate filename.
-		my $rulesfile = "$default_rulespath/$enabled_app_layer_proto\.rules";
+			# Generate filename.
+			my $rulesfile = "$default_rulespath/$enabled_app_layer_proto\.rules";
 
-		# Check if such a file exists.
-		if (-f "$rulesfile") {
-			# Write the rulesfile name to the file.
-			print FILE " - $rulesfile\n";
-		}
+			# Check if such a file exists.
+			if (-f "$rulesfile") {
+				# Write the rulesfile name to the file.
+				print FILE " - $rulesfile\n";
+			}
 
-		# Generate filename with "events" in filename.
-		$rulesfile = "$default_rulespath/$enabled_app_layer_proto\-events.rules";
+			# Generate filename with "events" in filename.
+			$rulesfile = "$default_rulespath/$enabled_app_layer_proto\-events.rules";
 
-		# Check if this file exists.
-		if (-f "$rulesfile" ) {
-			# Write the rulesfile name to the file.
-			print FILE " - $rulesfile\n";
+			# Check if this file exists.
+			if (-f "$rulesfile" ) {
+				# Write the rulesfile name to the file.
+				print FILE " - $rulesfile\n";
+			}
 		}
 	}
 
diff --git a/config/menu/EX-wlanap.menu b/config/menu/EX-wlanap.menu
index 95b653052..2e06d8586 100644
--- a/config/menu/EX-wlanap.menu
+++ b/config/menu/EX-wlanap.menu
@@ -1,5 +1,5 @@
-    $subipfire->{'54.wlanap'} = {'caption' => WLanAP,
+    $subipfire->{'54.wlanap'} = {'caption' => $Lang::tr{'wlanap'},
 				  'uri' => '/cgi-bin/wlanap.cgi',
-				  'title' => WLanAP,
+				  'title' => $Lang::tr{'wlanap'},
 				  'enabled' => 1,
 				  };
diff --git a/doc/language_issues.de b/doc/language_issues.de
index a10102a03..bdedb13c5 100644
--- a/doc/language_issues.de
+++ b/doc/language_issues.de
@@ -480,6 +480,7 @@ WARNING: translation string unused: ls_pam_unix
 WARNING: translation string unused: ls_sshd
 WARNING: translation string unused: ls_syslogd
 WARNING: translation string unused: mac address error not 00
+WARNING: translation string unused: mac filter
 WARNING: translation string unused: mailmethod
 WARNING: translation string unused: mailprogramm
 WARNING: translation string unused: manage ovpn
@@ -866,9 +867,19 @@ WARNING: translation string unused: wildcards
 WARNING: translation string unused: wins server
 WARNING: translation string unused: wins support
 WARNING: translation string unused: wlan clients
+WARNING: translation string unused: wlanap debugging
+WARNING: translation string unused: wlanap del interface
+WARNING: translation string unused: wlanap informations
 WARNING: translation string unused: wlanap link dhcp
 WARNING: translation string unused: wlanap link wireless
+WARNING: translation string unused: wlanap no interface
+WARNING: translation string unused: wlanap notifications
+WARNING: translation string unused: wlanap select interface
+WARNING: translation string unused: wlanap verbose
+WARNING: translation string unused: wlanap warnings
+WARNING: translation string unused: wlanap wlan card
 WARNING: translation string unused: wlanap wlan services
+WARNING: translation string unused: wlanap wlan settings
 WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
@@ -1120,3 +1131,6 @@ WARNING: untranslated string: wlan client management frame protection = Manageme
 WARNING: untranslated string: wlanap 802.11w disabled = Disabled
 WARNING: untranslated string: wlanap 802.11w enforced = Enforced
 WARNING: untranslated string: wlanap 802.11w optional = Optional
+WARNING: untranslated string: wlanap clients = unknown string
+WARNING: untranslated string: wlanap psk = Pre-Shared Key
+WARNING: untranslated string: wlanap wireless mode = Wireless Mode
diff --git a/doc/language_issues.en b/doc/language_issues.en
index 7ae1a19bb..e196bd640 100644
--- a/doc/language_issues.en
+++ b/doc/language_issues.en
@@ -1267,7 +1267,6 @@ WARNING: untranslated string: mac address saved = Successfully saved!
 WARNING: untranslated string: mac address saved txt = The MAC address has been successfully saved, but changes will only take effect after reboot or reconnection.
 WARNING: untranslated string: mac address title = Assign MAC Address
 WARNING: untranslated string: mac desc = Here you are able to change the MAC address on red0. The address must be entered in hexadecimal (0-9,a-f), a valid entry is <br />e.g. 00-01-02-0e-b8-d6 or 00:01:02:0e:b8:d6.
-WARNING: untranslated string: mac filter = MAC filter
 WARNING: untranslated string: mac new = new MAC address:
 WARNING: untranslated string: mac1 new = new MAC address 1 (vdsl-inet):
 WARNING: untranslated string: mac2 new = new MAC address 2 (vdsl-iptv):
@@ -2342,7 +2341,7 @@ WARNING: untranslated string: wlan client wpa mode all = Auto
 WARNING: untranslated string: wlan client wpa mode ccmp ccmp = CCMP-CCMP
 WARNING: untranslated string: wlan client wpa mode ccmp tkip = CCMP-TKIP
 WARNING: untranslated string: wlan client wpa mode tkip tkip = TKIP-TKIP
-WARNING: untranslated string: wlanap = Access Point
+WARNING: untranslated string: wlanap = Wireless Access Point
 WARNING: untranslated string: wlanap 802.11w disabled = Disabled
 WARNING: untranslated string: wlanap 802.11w enforced = Enforced
 WARNING: untranslated string: wlanap 802.11w optional = Optional
@@ -2350,27 +2349,20 @@ WARNING: untranslated string: wlanap auto = Automatic Channel Selection
 WARNING: untranslated string: wlanap broadcast ssid = Broadcast SSID
 WARNING: untranslated string: wlanap channel = Channel
 WARNING: untranslated string: wlanap client isolation = Client Isolation
-WARNING: untranslated string: wlanap configuration = Access Point Configuration
+WARNING: untranslated string: wlanap clients = unknown string
+WARNING: untranslated string: wlanap configuration = Wireless Access Point Configuration
 WARNING: untranslated string: wlanap country = Country Code
-WARNING: untranslated string: wlanap debugging = Debugging
-WARNING: untranslated string: wlanap del interface = Remove selected interface?
 WARNING: untranslated string: wlanap encryption = Encryption
-WARNING: untranslated string: wlanap informations = Informations
-WARNING: untranslated string: wlanap interface = Select interface
-WARNING: untranslated string: wlanap invalid wpa = Invalid length in WPA Passphrase. Must be between 8 and 63 characters.
+WARNING: untranslated string: wlanap interface = Select Interface
+WARNING: untranslated string: wlanap invalid wpa = Invalid length in WPA passphrase. Must be between 8 and 63 characters.
 WARNING: untranslated string: wlanap management frame protection = Management Frame Protection (802.11w)
-WARNING: untranslated string: wlanap neighbor scan = Neighborhood scan
-WARNING: untranslated string: wlanap neighbor scan warning = Warning! Disabling may violate regulatory rules!
-WARNING: untranslated string: wlanap no interface = Selected interface is not a wirless lan card!
+WARNING: untranslated string: wlanap neighbor scan = Neighborhood Scan
+WARNING: untranslated string: wlanap neighbor scan warning = Warning: Disabling may violate regulatory rules
 WARNING: untranslated string: wlanap none = none
-WARNING: untranslated string: wlanap notifications = Notifications
-WARNING: untranslated string: wlanap select interface = Please select the wireless lan interface.
+WARNING: untranslated string: wlanap psk = Pre-Shared Key
 WARNING: untranslated string: wlanap ssid = SSID
-WARNING: untranslated string: wlanap verbose = Verbose
-WARNING: untranslated string: wlanap warnings = Warnings
-WARNING: untranslated string: wlanap wlan card = WLan Card
-WARNING: untranslated string: wlanap wlan settings = WLan Settings
-WARNING: untranslated string: wlanap wlan status = WLan Status
+WARNING: untranslated string: wlanap wireless mode = Wireless Mode
+WARNING: untranslated string: wlanap wlan status = WiFi Status
 WARNING: untranslated string: wol wakeup = WakeUp
 WARNING: untranslated string: workgroup = Workgroup
 WARNING: untranslated string: working = Working
diff --git a/doc/language_issues.es b/doc/language_issues.es
index 259c3a9c3..4ff53b155 100644
--- a/doc/language_issues.es
+++ b/doc/language_issues.es
@@ -528,6 +528,7 @@ WARNING: translation string unused: ls_pam_unix
 WARNING: translation string unused: ls_sshd
 WARNING: translation string unused: ls_syslogd
 WARNING: translation string unused: mac address error not 00
+WARNING: translation string unused: mac filter
 WARNING: translation string unused: mailmethod
 WARNING: translation string unused: mailprogramm
 WARNING: translation string unused: manage ovpn
@@ -937,9 +938,19 @@ WARNING: translation string unused: wins server
 WARNING: translation string unused: wins support
 WARNING: translation string unused: wlan clients
 WARNING: translation string unused: wlanap access point
+WARNING: translation string unused: wlanap debugging
+WARNING: translation string unused: wlanap del interface
+WARNING: translation string unused: wlanap informations
 WARNING: translation string unused: wlanap link dhcp
 WARNING: translation string unused: wlanap link wireless
+WARNING: translation string unused: wlanap no interface
+WARNING: translation string unused: wlanap notifications
+WARNING: translation string unused: wlanap select interface
+WARNING: translation string unused: wlanap verbose
+WARNING: translation string unused: wlanap warnings
+WARNING: translation string unused: wlanap wlan card
 WARNING: translation string unused: wlanap wlan services
+WARNING: translation string unused: wlanap wlan settings
 WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
@@ -1175,4 +1186,7 @@ WARNING: untranslated string: wio_webinterface = unknown string
 WARNING: untranslated string: wio_webinterface_link = unknown string
 WARNING: untranslated string: wireguard = WireGuard
 WARNING: untranslated string: wlan client configuration = Wireless Client Configuration
-WARNING: untranslated string: wlanap = Access Point
+WARNING: untranslated string: wlanap = Wireless Access Point
+WARNING: untranslated string: wlanap clients = unknown string
+WARNING: untranslated string: wlanap psk = Pre-Shared Key
+WARNING: untranslated string: wlanap wireless mode = Wireless Mode
diff --git a/doc/language_issues.fr b/doc/language_issues.fr
index 41e39f18b..c21cb0067 100644
--- a/doc/language_issues.fr
+++ b/doc/language_issues.fr
@@ -508,6 +508,7 @@ WARNING: translation string unused: ls_pam_unix
 WARNING: translation string unused: ls_sshd
 WARNING: translation string unused: ls_syslogd
 WARNING: translation string unused: mac address error not 00
+WARNING: translation string unused: mac filter
 WARNING: translation string unused: mailmethod
 WARNING: translation string unused: mailprogramm
 WARNING: translation string unused: manage ovpn
@@ -906,9 +907,19 @@ WARNING: translation string unused: wildcards
 WARNING: translation string unused: wins server
 WARNING: translation string unused: wins support
 WARNING: translation string unused: wlan clients
+WARNING: translation string unused: wlanap debugging
+WARNING: translation string unused: wlanap del interface
+WARNING: translation string unused: wlanap informations
 WARNING: translation string unused: wlanap link dhcp
 WARNING: translation string unused: wlanap link wireless
+WARNING: translation string unused: wlanap no interface
+WARNING: translation string unused: wlanap notifications
+WARNING: translation string unused: wlanap select interface
+WARNING: translation string unused: wlanap verbose
+WARNING: translation string unused: wlanap warnings
+WARNING: translation string unused: wlanap wlan card
 WARNING: translation string unused: wlanap wlan services
+WARNING: translation string unused: wlanap wlan settings
 WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
@@ -1112,3 +1123,6 @@ WARNING: untranslated string: wio_wanname = unknown string
 WARNING: untranslated string: wio_webinterface = unknown string
 WARNING: untranslated string: wio_webinterface_link = unknown string
 WARNING: untranslated string: wireguard = WireGuard
+WARNING: untranslated string: wlanap clients = unknown string
+WARNING: untranslated string: wlanap psk = Pre-Shared Key
+WARNING: untranslated string: wlanap wireless mode = Wireless Mode
diff --git a/doc/language_issues.it b/doc/language_issues.it
index f900bced1..9974b34f3 100644
--- a/doc/language_issues.it
+++ b/doc/language_issues.it
@@ -465,6 +465,7 @@ WARNING: translation string unused: ls_pam_unix
 WARNING: translation string unused: ls_sshd
 WARNING: translation string unused: ls_syslogd
 WARNING: translation string unused: mac address error not 00
+WARNING: translation string unused: mac filter
 WARNING: translation string unused: mailmethod
 WARNING: translation string unused: mailprogramm
 WARNING: translation string unused: manage ovpn
@@ -861,9 +862,19 @@ WARNING: translation string unused: wins server
 WARNING: translation string unused: wins support
 WARNING: translation string unused: wlan clients
 WARNING: translation string unused: wlanap access point
+WARNING: translation string unused: wlanap debugging
+WARNING: translation string unused: wlanap del interface
+WARNING: translation string unused: wlanap informations
 WARNING: translation string unused: wlanap link dhcp
 WARNING: translation string unused: wlanap link wireless
+WARNING: translation string unused: wlanap no interface
+WARNING: translation string unused: wlanap notifications
+WARNING: translation string unused: wlanap select interface
+WARNING: translation string unused: wlanap verbose
+WARNING: translation string unused: wlanap warnings
+WARNING: translation string unused: wlanap wlan card
 WARNING: translation string unused: wlanap wlan services
+WARNING: translation string unused: wlanap wlan settings
 WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
@@ -1481,18 +1492,21 @@ WARNING: untranslated string: wlan client method = Method
 WARNING: untranslated string: wlan client password = Password
 WARNING: untranslated string: wlan client tls cipher = TLS Cipher
 WARNING: untranslated string: wlan client tls version = TLS Version
-WARNING: untranslated string: wlanap = Access Point
+WARNING: untranslated string: wlanap = Wireless Access Point
 WARNING: untranslated string: wlanap 802.11w disabled = Disabled
 WARNING: untranslated string: wlanap 802.11w enforced = Enforced
 WARNING: untranslated string: wlanap 802.11w optional = Optional
 WARNING: untranslated string: wlanap auto = Automatic Channel Selection
 WARNING: untranslated string: wlanap broadcast ssid = Broadcast SSID
 WARNING: untranslated string: wlanap client isolation = Client Isolation
-WARNING: untranslated string: wlanap configuration = Access Point Configuration
+WARNING: untranslated string: wlanap clients = unknown string
+WARNING: untranslated string: wlanap configuration = Wireless Access Point Configuration
 WARNING: untranslated string: wlanap management frame protection = Management Frame Protection (802.11w)
-WARNING: untranslated string: wlanap neighbor scan = Neighborhood scan
-WARNING: untranslated string: wlanap neighbor scan warning = Warning! Disabling may violate regulatory rules!
+WARNING: untranslated string: wlanap neighbor scan = Neighborhood Scan
+WARNING: untranslated string: wlanap neighbor scan warning = Warning: Disabling may violate regulatory rules
+WARNING: untranslated string: wlanap psk = Pre-Shared Key
 WARNING: untranslated string: wlanap ssid = SSID
+WARNING: untranslated string: wlanap wireless mode = Wireless Mode
 WARNING: untranslated string: working = Working
 WARNING: untranslated string: zoneconf notice reboot = Please reboot to apply your changes.
 WARNING: untranslated string: zoneconf title = Zone Configuration
diff --git a/doc/language_issues.nl b/doc/language_issues.nl
index dadcbaea2..452dd5b33 100644
--- a/doc/language_issues.nl
+++ b/doc/language_issues.nl
@@ -467,6 +467,7 @@ WARNING: translation string unused: ls_pam_unix
 WARNING: translation string unused: ls_sshd
 WARNING: translation string unused: ls_syslogd
 WARNING: translation string unused: mac address error not 00
+WARNING: translation string unused: mac filter
 WARNING: translation string unused: mailmethod
 WARNING: translation string unused: mailprogramm
 WARNING: translation string unused: manage ovpn
@@ -862,9 +863,19 @@ WARNING: translation string unused: wins server
 WARNING: translation string unused: wins support
 WARNING: translation string unused: wlan clients
 WARNING: translation string unused: wlanap access point
+WARNING: translation string unused: wlanap debugging
+WARNING: translation string unused: wlanap del interface
+WARNING: translation string unused: wlanap informations
 WARNING: translation string unused: wlanap link dhcp
 WARNING: translation string unused: wlanap link wireless
+WARNING: translation string unused: wlanap no interface
+WARNING: translation string unused: wlanap notifications
+WARNING: translation string unused: wlanap select interface
+WARNING: translation string unused: wlanap verbose
+WARNING: translation string unused: wlanap warnings
+WARNING: translation string unused: wlanap wlan card
 WARNING: translation string unused: wlanap wlan services
+WARNING: translation string unused: wlanap wlan settings
 WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
@@ -1504,18 +1515,21 @@ WARNING: untranslated string: wlan client method = Method
 WARNING: untranslated string: wlan client password = Password
 WARNING: untranslated string: wlan client tls cipher = TLS Cipher
 WARNING: untranslated string: wlan client tls version = TLS Version
-WARNING: untranslated string: wlanap = Access Point
+WARNING: untranslated string: wlanap = Wireless Access Point
 WARNING: untranslated string: wlanap 802.11w disabled = Disabled
 WARNING: untranslated string: wlanap 802.11w enforced = Enforced
 WARNING: untranslated string: wlanap 802.11w optional = Optional
 WARNING: untranslated string: wlanap auto = Automatic Channel Selection
 WARNING: untranslated string: wlanap broadcast ssid = Broadcast SSID
 WARNING: untranslated string: wlanap client isolation = Client Isolation
-WARNING: untranslated string: wlanap configuration = Access Point Configuration
+WARNING: untranslated string: wlanap clients = unknown string
+WARNING: untranslated string: wlanap configuration = Wireless Access Point Configuration
 WARNING: untranslated string: wlanap management frame protection = Management Frame Protection (802.11w)
-WARNING: untranslated string: wlanap neighbor scan = Neighborhood scan
-WARNING: untranslated string: wlanap neighbor scan warning = Warning! Disabling may violate regulatory rules!
+WARNING: untranslated string: wlanap neighbor scan = Neighborhood Scan
+WARNING: untranslated string: wlanap neighbor scan warning = Warning: Disabling may violate regulatory rules
+WARNING: untranslated string: wlanap psk = Pre-Shared Key
 WARNING: untranslated string: wlanap ssid = SSID
+WARNING: untranslated string: wlanap wireless mode = Wireless Mode
 WARNING: untranslated string: working = Working
 WARNING: untranslated string: zoneconf notice reboot = Please reboot to apply your changes.
 WARNING: untranslated string: zoneconf title = Zone Configuration
diff --git a/doc/language_issues.pl b/doc/language_issues.pl
index 2f8d0e501..8afc26cab 100644
--- a/doc/language_issues.pl
+++ b/doc/language_issues.pl
@@ -773,9 +773,19 @@ WARNING: translation string unused: wildcards
 WARNING: translation string unused: wins server
 WARNING: translation string unused: wins support
 WARNING: translation string unused: wlanap access point
+WARNING: translation string unused: wlanap debugging
+WARNING: translation string unused: wlanap del interface
+WARNING: translation string unused: wlanap informations
 WARNING: translation string unused: wlanap link dhcp
 WARNING: translation string unused: wlanap link wireless
+WARNING: translation string unused: wlanap no interface
+WARNING: translation string unused: wlanap notifications
+WARNING: translation string unused: wlanap select interface
+WARNING: translation string unused: wlanap verbose
+WARNING: translation string unused: wlanap warnings
+WARNING: translation string unused: wlanap wlan card
 WARNING: translation string unused: wlanap wlan services
+WARNING: translation string unused: wlanap wlan settings
 WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
@@ -1344,7 +1354,6 @@ WARNING: untranslated string: log drop hostile in = Log dropped packets FROM hos
 WARNING: untranslated string: log drop hostile out = Log dropped packets TO hostile networks
 WARNING: untranslated string: log dropped conntrack invalids = Log dropped packets classified as INVALID by connection tracking
 WARNING: untranslated string: log server protocol = protocol:
-WARNING: untranslated string: mac filter = MAC filter
 WARNING: untranslated string: masquerade blue = Masquerade BLUE
 WARNING: untranslated string: masquerade green = Masquerade GREEN
 WARNING: untranslated string: masquerade orange = Masquerade ORANGE
@@ -1776,19 +1785,22 @@ WARNING: untranslated string: wlan client wpa mode all = Auto
 WARNING: untranslated string: wlan client wpa mode ccmp ccmp = CCMP-CCMP
 WARNING: untranslated string: wlan client wpa mode ccmp tkip = CCMP-TKIP
 WARNING: untranslated string: wlan client wpa mode tkip tkip = TKIP-TKIP
-WARNING: untranslated string: wlanap = Access Point
+WARNING: untranslated string: wlanap = Wireless Access Point
 WARNING: untranslated string: wlanap 802.11w disabled = Disabled
 WARNING: untranslated string: wlanap 802.11w enforced = Enforced
 WARNING: untranslated string: wlanap 802.11w optional = Optional
 WARNING: untranslated string: wlanap auto = Automatic Channel Selection
 WARNING: untranslated string: wlanap broadcast ssid = Broadcast SSID
 WARNING: untranslated string: wlanap client isolation = Client Isolation
-WARNING: untranslated string: wlanap configuration = Access Point Configuration
+WARNING: untranslated string: wlanap clients = unknown string
+WARNING: untranslated string: wlanap configuration = Wireless Access Point Configuration
 WARNING: untranslated string: wlanap country = Country Code
 WARNING: untranslated string: wlanap management frame protection = Management Frame Protection (802.11w)
-WARNING: untranslated string: wlanap neighbor scan = Neighborhood scan
-WARNING: untranslated string: wlanap neighbor scan warning = Warning! Disabling may violate regulatory rules!
+WARNING: untranslated string: wlanap neighbor scan = Neighborhood Scan
+WARNING: untranslated string: wlanap neighbor scan warning = Warning: Disabling may violate regulatory rules
+WARNING: untranslated string: wlanap psk = Pre-Shared Key
 WARNING: untranslated string: wlanap ssid = SSID
+WARNING: untranslated string: wlanap wireless mode = Wireless Mode
 WARNING: untranslated string: working = Working
 WARNING: untranslated string: zoneconf notice reboot = Please reboot to apply your changes.
 WARNING: untranslated string: zoneconf title = Zone Configuration
diff --git a/doc/language_issues.ru b/doc/language_issues.ru
index e57d2199c..3719cd63a 100644
--- a/doc/language_issues.ru
+++ b/doc/language_issues.ru
@@ -767,9 +767,19 @@ WARNING: translation string unused: wildcards
 WARNING: translation string unused: wins server
 WARNING: translation string unused: wins support
 WARNING: translation string unused: wlanap access point
+WARNING: translation string unused: wlanap debugging
+WARNING: translation string unused: wlanap del interface
+WARNING: translation string unused: wlanap informations
 WARNING: translation string unused: wlanap link dhcp
 WARNING: translation string unused: wlanap link wireless
+WARNING: translation string unused: wlanap no interface
+WARNING: translation string unused: wlanap notifications
+WARNING: translation string unused: wlanap select interface
+WARNING: translation string unused: wlanap verbose
+WARNING: translation string unused: wlanap warnings
+WARNING: translation string unused: wlanap wlan card
 WARNING: translation string unused: wlanap wlan services
+WARNING: translation string unused: wlanap wlan settings
 WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: yearly firewallhits
@@ -1340,7 +1350,6 @@ WARNING: untranslated string: log drop hostile in = Log dropped packets FROM hos
 WARNING: untranslated string: log drop hostile out = Log dropped packets TO hostile networks
 WARNING: untranslated string: log dropped conntrack invalids = Log dropped packets classified as INVALID by connection tracking
 WARNING: untranslated string: log server protocol = protocol:
-WARNING: untranslated string: mac filter = MAC filter
 WARNING: untranslated string: masquerade blue = Masquerade BLUE
 WARNING: untranslated string: masquerade green = Masquerade GREEN
 WARNING: untranslated string: masquerade orange = Masquerade ORANGE
@@ -1769,19 +1778,22 @@ WARNING: untranslated string: wlan client wpa mode all = Auto
 WARNING: untranslated string: wlan client wpa mode ccmp ccmp = CCMP-CCMP
 WARNING: untranslated string: wlan client wpa mode ccmp tkip = CCMP-TKIP
 WARNING: untranslated string: wlan client wpa mode tkip tkip = TKIP-TKIP
-WARNING: untranslated string: wlanap = Access Point
+WARNING: untranslated string: wlanap = Wireless Access Point
 WARNING: untranslated string: wlanap 802.11w disabled = Disabled
 WARNING: untranslated string: wlanap 802.11w enforced = Enforced
 WARNING: untranslated string: wlanap 802.11w optional = Optional
 WARNING: untranslated string: wlanap auto = Automatic Channel Selection
 WARNING: untranslated string: wlanap broadcast ssid = Broadcast SSID
 WARNING: untranslated string: wlanap client isolation = Client Isolation
-WARNING: untranslated string: wlanap configuration = Access Point Configuration
+WARNING: untranslated string: wlanap clients = unknown string
+WARNING: untranslated string: wlanap configuration = Wireless Access Point Configuration
 WARNING: untranslated string: wlanap country = Country Code
 WARNING: untranslated string: wlanap management frame protection = Management Frame Protection (802.11w)
-WARNING: untranslated string: wlanap neighbor scan = Neighborhood scan
-WARNING: untranslated string: wlanap neighbor scan warning = Warning! Disabling may violate regulatory rules!
+WARNING: untranslated string: wlanap neighbor scan = Neighborhood Scan
+WARNING: untranslated string: wlanap neighbor scan warning = Warning: Disabling may violate regulatory rules
+WARNING: untranslated string: wlanap psk = Pre-Shared Key
 WARNING: untranslated string: wlanap ssid = SSID
+WARNING: untranslated string: wlanap wireless mode = Wireless Mode
 WARNING: untranslated string: working = Working
 WARNING: untranslated string: zoneconf notice reboot = Please reboot to apply your changes.
 WARNING: untranslated string: zoneconf title = Zone Configuration
diff --git a/doc/language_issues.tr b/doc/language_issues.tr
index b5197e108..5d5c13cf8 100644
--- a/doc/language_issues.tr
+++ b/doc/language_issues.tr
@@ -494,6 +494,7 @@ WARNING: translation string unused: ls_pam_unix
 WARNING: translation string unused: ls_sshd
 WARNING: translation string unused: ls_syslogd
 WARNING: translation string unused: mac address error not 00
+WARNING: translation string unused: mac filter
 WARNING: translation string unused: mailmethod
 WARNING: translation string unused: mailprogramm
 WARNING: translation string unused: manage ovpn
@@ -890,9 +891,19 @@ WARNING: translation string unused: wildcards
 WARNING: translation string unused: wins server
 WARNING: translation string unused: wins support
 WARNING: translation string unused: wlan clients
+WARNING: translation string unused: wlanap debugging
+WARNING: translation string unused: wlanap del interface
+WARNING: translation string unused: wlanap informations
 WARNING: translation string unused: wlanap link dhcp
 WARNING: translation string unused: wlanap link wireless
+WARNING: translation string unused: wlanap no interface
+WARNING: translation string unused: wlanap notifications
+WARNING: translation string unused: wlanap select interface
+WARNING: translation string unused: wlanap verbose
+WARNING: translation string unused: wlanap warnings
+WARNING: translation string unused: wlanap wlan card
 WARNING: translation string unused: wlanap wlan services
+WARNING: translation string unused: wlanap wlan settings
 WARNING: translation string unused: xtaccess all error
 WARNING: translation string unused: xtaccess bad transfert
 WARNING: translation string unused: year-graph
@@ -1356,10 +1367,13 @@ WARNING: untranslated string: wlanap 802.11w optional = Optional
 WARNING: untranslated string: wlanap auto = Automatic Channel Selection
 WARNING: untranslated string: wlanap broadcast ssid = Broadcast SSID
 WARNING: untranslated string: wlanap client isolation = Client Isolation
+WARNING: untranslated string: wlanap clients = unknown string
 WARNING: untranslated string: wlanap management frame protection = Management Frame Protection (802.11w)
-WARNING: untranslated string: wlanap neighbor scan = Neighborhood scan
-WARNING: untranslated string: wlanap neighbor scan warning = Warning! Disabling may violate regulatory rules!
+WARNING: untranslated string: wlanap neighbor scan = Neighborhood Scan
+WARNING: untranslated string: wlanap neighbor scan warning = Warning: Disabling may violate regulatory rules
+WARNING: untranslated string: wlanap psk = Pre-Shared Key
 WARNING: untranslated string: wlanap ssid = SSID
+WARNING: untranslated string: wlanap wireless mode = Wireless Mode
 WARNING: untranslated string: working = Working
 WARNING: untranslated string: zoneconf notice reboot = Please reboot to apply your changes.
 WARNING: untranslated string: zoneconf title = Zone Configuration
diff --git a/doc/language_missings b/doc/language_missings
index ef5c58ff1..de2217c60 100644
--- a/doc/language_missings
+++ b/doc/language_missings
@@ -108,6 +108,9 @@
 < wlanap 802.11w disabled
 < wlanap 802.11w enforced
 < wlanap 802.11w optional
+< wlanap psk
+< wlanap wireless mode
+< wlanap wlan clients
 < wlan client encryption wpa3
 < wlan client management frame protection
 ############################################################################
@@ -154,6 +157,9 @@
 < transport mode does not support vti
 < wireguard
 < wlanap
+< wlanap psk
+< wlanap wireless mode
+< wlanap wlan clients
 < wlan client configuration
 ############################################################################
 # Checking cgi-bin translations for language: fr                           #
@@ -178,6 +184,9 @@
 < timeformat
 < upload fcdsl.o
 < wireguard
+< wlanap psk
+< wlanap wireless mode
+< wlanap wlan clients
 ############################################################################
 # Checking cgi-bin translations for language: it                           #
 ############################################################################
@@ -671,7 +680,10 @@
 < wlanap management frame protection
 < wlanap neighbor scan
 < wlanap neighbor scan warning
+< wlanap psk
 < wlanap ssid
+< wlanap wireless mode
+< wlanap wlan clients
 < wlan client anonymous identity
 < wlan client auth auto
 < wlan client authentication settings
@@ -1228,7 +1240,10 @@
 < wlanap management frame protection
 < wlanap neighbor scan
 < wlanap neighbor scan warning
+< wlanap psk
 < wlanap ssid
+< wlanap wireless mode
+< wlanap wlan clients
 < wlan client anonymous identity
 < wlan client auth auto
 < wlan client authentication settings
@@ -2201,7 +2216,10 @@
 < wlanap management frame protection
 < wlanap neighbor scan
 < wlanap neighbor scan warning
+< wlanap psk
 < wlanap ssid
+< wlanap wireless mode
+< wlanap wlan clients
 < wlan client
 < wlan client advanced settings
 < wlan client and
@@ -3210,7 +3228,10 @@
 < wlanap management frame protection
 < wlanap neighbor scan
 < wlanap neighbor scan warning
+< wlanap psk
 < wlanap ssid
+< wlanap wireless mode
+< wlanap wlan clients
 < wlan client
 < wlan client advanced settings
 < wlan client and
@@ -3592,7 +3613,10 @@
 < wlanap management frame protection
 < wlanap neighbor scan
 < wlanap neighbor scan warning
+< wlanap psk
 < wlanap ssid
+< wlanap wireless mode
+< wlanap wlan clients
 < wlan client encryption wpa3
 < wlan client management frame protection
 < working
diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi
index c2a5605fc..4de4c579c 100644
--- a/html/cgi-bin/wlanap.cgi
+++ b/html/cgi-bin/wlanap.cgi
@@ -18,65 +18,39 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
 #                                                                             #
 ###############################################################################
-#
-# WLAN AP cgi based on wlanap.cgi written by Markus Hoffmann & Olaf Westrik
-#
 
 use strict;
 
 # enable only the following on debugging purpose
-#use warnings;
-#use CGI::Carp 'fatalsToBrowser';
+use warnings;
+use CGI::Carp 'fatalsToBrowser';
 
 require '/var/ipfire/general-functions.pl';
 require '/var/ipfire/lang.pl';
 require '/var/ipfire/header.pl';
 
-my $debug = 0;
-my $status = '';
 my $errormessage = '';
-my $status_started = "<td align='center' bgcolor='${Header::colourgreen}'><font color='white'><strong>$Lang::tr{'running'}</strong></font></td>";
-my $status_stopped = "<td align='center' bgcolor='${Header::colourred}'><font color='white'><strong>$Lang::tr{'stopped'}</strong></font></td>";
-my $count=0;
-my $col='';
-# get rid of used only once warnings
-my @onlyonce = ( $Header::colourgreen, $Header::colourred );
-undef @onlyonce;
-
 my %selected=();
 my %checked=();
-my %color = ();
-my %mainsettings = ();
-my %netsettings=();
 my %wlanapsettings=();
-my $channel = '';
-my $country = '';
-my $txpower = '';
-
-&General::readhash("${General::swroot}/main/settings", \%mainsettings);
-&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
-&General::readhash("/var/ipfire/ethernet/settings", \%netsettings);
-
-$wlanapsettings{'APMODE'} = 'on';
-$wlanapsettings{'ACTION'} = '';
-$wlanapsettings{'MACMODE'} = '0';
-$wlanapsettings{'INTERFACE'} = '';
-$wlanapsettings{'SSID'} = 'IPFire';
-$wlanapsettings{'HIDESSID'} = 'off';
-$wlanapsettings{'ENC'} = 'wpa2';               # none / wpa1 /wpa2
-$wlanapsettings{'TXPOWER'} = 'auto';
-$wlanapsettings{'CHANNEL'} = '6';
-$wlanapsettings{'COUNTRY'} = '00';
-$wlanapsettings{'HW_MODE'} = 'g';
-$wlanapsettings{'PWD'} = 'IPFire-2.x';
-$wlanapsettings{'SYSLOGLEVEL'} = '0';
-$wlanapsettings{'DEBUG'} = '4';
-$wlanapsettings{'DRIVER'} = 'NL80211';
-$wlanapsettings{'HTCAPS'} = '';
-$wlanapsettings{'VHTCAPS'} = '';
-$wlanapsettings{'NOSCAN'} = 'off';
-$wlanapsettings{'CLIENTISOLATION'} = 'off';
-$wlanapsettings{'IEEE80211W'} = 'off';
+
+# Set defaults
+&General::set_defaults(\%wlanapsettings, {
+	"APMODE" => "on",
+	"SSID" => "IPFire",
+	"HIDESSID" => "off",
+	"ENC" => "wpa2",
+	"TXPOWER" => "auto",
+	"CHANNEL" => "6",
+	"COUNTRY" => "00",
+	"HW_MODE" => "g",
+	"PWD" => "",
+	"HTCAPS" => "",
+	"VHTCAPS" => "",
+	"NOSCAN" => "off",
+	"CLIENTISOLATION" => "off",
+	"IEEE80211W" => "off",
+});
 
 &General::readhash("/var/ipfire/wlanap/settings", \%wlanapsettings);
 &Header::getcgihash(\%wlanapsettings);
@@ -84,116 +58,51 @@ $wlanapsettings{'IEEE80211W'} = 'off';
 # Find the selected interface
 my $INTF = &Network::get_intf_by_address($wlanapsettings{'INTERFACE'});
 
-my @macs = $wlanapsettings{'MACS'};
-
 delete $wlanapsettings{'__CGI__'};
 delete $wlanapsettings{'x'};
 delete $wlanapsettings{'y'};
-delete $wlanapsettings{'MACS'};
-delete $wlanapsettings{'ACCEPT_MACS'};
-delete $wlanapsettings{'DENY_MACS'};
 
 &Header::showhttpheaders();
 
-my $string=();
-my $status=();
-my $errormessage = '';
-my $memory = 0;
-my @memory=();
-my @pid=();
-my @hostapd=();
-sub pid
-{
-# for pid and memory
-	open(FILE, '/usr/local/bin/addonctrl hostapd status | ');
-	@hostapd = <FILE>;
-	close(FILE);
-	$string = join("", @hostapd);
-	$string =~ s/[a-z_]//gi;
-	$string =~ s/\[[0-1]\;[0-9]+//gi;
-	$string =~ s/[\(\)\.]//gi;
-	$string =~ s/  //gi;
-	$string =~ s/^[//gi;
-	@pid = split(/\s/,$string);
-	if (open(FILE, "/proc/$pid[0]/statm")){
-		my $temp = <FILE>;
-		@memory = split(/ /,$temp);
-		close(FILE);
-		}
-	$memory+=$memory[0];
-}
-pid();
-
-
-
-if ( $wlanapsettings{'ACTION'} eq "$Lang::tr{'wlanap del interface'}" ){
-	delete $wlanapsettings{'INTERFACE'};
-	&General::writehash("/var/ipfire/wlanap/settings", \%wlanapsettings);
-}
-
-if ( $wlanapsettings{'ACTION'} eq "$Lang::tr{'save'}" ){
+if ($wlanapsettings{'ACTION'} eq "$Lang::tr{'save'}") {
 	# verify WPA Passphrase - only with enabled enc
 	if ($wlanapsettings{'ENC'} ne "none") {
 		# must be 8 .. 63 characters
-		if ( (length($wlanapsettings{'PWD'}) < 8) || (length($wlanapsettings{'PWD'}) > 63)){
+		if ((length($wlanapsettings{'PWD'}) < 8) || (length($wlanapsettings{'PWD'}) > 63)) {
 			$errormessage .= "$Lang::tr{'wlanap invalid wpa'}<br />";
 		}
+
 		# only ASCII alowed
-		if ( !($wlanapsettings{'PWD'} !~ /[^\x00-\x7f]/) ){
+		if (!($wlanapsettings{'PWD'} !~ /[^\x00-\x7f]/)) {
 			$errormessage .= "$Lang::tr{'wlanap invalid wpa'}<br />";
 		}
 	}
 
-	if ( $errormessage eq '' ){
+	if ($errormessage eq '') {
 		&General::writehash("/var/ipfire/wlanap/settings", \%wlanapsettings);
 		&WriteConfig_hostapd();
 
 		&General::system("/usr/local/bin/wlanapctrl", "restart");
-		pid();
 	}
-}elsif ( $wlanapsettings{'ACTION'} eq "$Lang::tr{'wlanap interface'}" ){
-	&General::writehash("/var/ipfire/wlanap/settings", \%wlanapsettings);
-}elsif ( ($wlanapsettings{'ACTION'} eq "$Lang::tr{'start'}") && ($memory == 0) ){
+
+# Start
+} elsif ($wlanapsettings{'ACTION'} eq "$Lang::tr{'start'}") {
 	&General::system("/usr/local/bin/wlanapctrl", "start");
-	pid();
-}elsif ( $wlanapsettings{'ACTION'} eq "$Lang::tr{'stop'}" ){
+
+# Stop
+} elsif ($wlanapsettings{'ACTION'} eq "$Lang::tr{'stop'}") {
 	&General::system("/usr/local/bin/wlanapctrl", "stop");
-	$memory=0;
 }
 
 &Header::openpage($Lang::tr{'wlanap configuration'}, 1, '', '');
 &Header::openbigbox('100%', 'left', '', $errormessage);
 
-if ( $errormessage ){
-	&Header::openbox('100%', 'center', $Lang::tr{'error messages'});
-	print "<class name='base'>$errormessage\n";
-	print "&nbsp;</class>\n";
-	&Header::closebox();
-}
-
-
-# Found this usefull piece of code in BlockOutTraffic AddOn  8-)
-#   fwrules.cgi
-###############
-# DEBUG DEBUG
-if ( $debug ){
-	&Header::openbox('100%', 'center', 'DEBUG');
-	my $debugCount = 0;
-	foreach my $line (sort keys %wlanapsettings) {
-		print "$line = '$wlanapsettings{$line}'<br />\n";
-		$debugCount++;
-	}
-	print "&nbsp;Count: $debugCount\n";
-	&Header::closebox();
-}
-# DEBUG DEBUG
-###############
+# Show any errors
+&Header::errorbox($errormessage);
 
 #
 # Driver and status detection
 #
-my $wlan_card_status = 'dummy';
-my $wlan_ap_status = '';
 my $message = "";
 
 my %INTERFACES = &Network::list_wireless_interfaces();
@@ -201,52 +110,7 @@ my %INTERFACES = &Network::list_wireless_interfaces();
 foreach my $intf (keys %INTERFACES) {
 	$selected{'INTERFACE'}{$intf} = '';
 }
-$selected{'ENC'}{$wlanapsettings{'INTERFACE'}} = "selected='selected'";
-
-if ( ($wlanapsettings{'INTERFACE'} eq '') ){
-	$message = $Lang::tr{'wlanap select interface'};
-	&Header::openbox('100%', 'center', "WLAN AP");
-print <<END
-$message<br />
-<form method='post' action='$ENV{'SCRIPT_NAME'}'>
-<select name='INTERFACE'>
-END
-;
-
-	foreach my $intf (sort keys %INTERFACES) {
-		print "<option value='${intf}' $selected{'INTERFACE'}{$intf}>$INTERFACES{$intf}</option>";
-	}
-
-print <<END
-</select>
-<br /><br />
-<hr size='1'>
-	<input type='submit' name='ACTION' value='$Lang::tr{'wlanap interface'}' /></form>
-END
-;
-	&Header::closebox();
-	&Header::closebigbox();
-	&Header::closepage();
-	exit;
-}else{
-	my $cmd_out = `/usr/sbin/iwconfig $INTF 2>/dev/null`;
-
-	if ( $cmd_out eq '' ){
-		$message = "$Lang::tr{'wlanap no interface'}";
-		$wlan_card_status = '';
-	}else{
-		$cmd_out = `/sbin/ifconfig $INTF`;
-		if ( $cmd_out eq '' ){
-			$wlan_card_status = 'down';
-		}else{
-			$wlan_card_status = 'up';
-			$cmd_out = `/usr/sbin/iwconfig $INTF | /bin/grep "Mode:Master"`;
-			if ( $cmd_out ne '' ){
-				$wlan_ap_status = 'up';
-			}
-		}
-	}
-}
+$selected{'INTERFACE'}{$wlanapsettings{'INTERFACE'}} = "selected='selected'";
 
 # Change old "n" to "gn"
 if ( $wlanapsettings{'HW_MODE'} eq 'n' ) {
@@ -275,323 +139,262 @@ $selected{'CHANNEL'}{$wlanapsettings{'CHANNEL'}} = "selected='selected'";
 $selected{'COUNTRY'}{$wlanapsettings{'COUNTRY'}} = "selected='selected'";
 $selected{'TXPOWER'}{$wlanapsettings{'TXPOWER'}} = "selected='selected'";
 $selected{'HW_MODE'}{$wlanapsettings{'HW_MODE'}} = "selected='selected'";
-$selected{'MACMODE'}{$wlanapsettings{'MACMODE'}} = "selected='selected'";
 
-my $monwlaninterface = $INTF;
-if ( -d '/sys/class/net/mon.' . $INTF) {
-	$monwlaninterface =  'mon.' . $INTF;
-}
+# Fetch all available channels
+my @channellist = &get_channellist($INTF);
 
-my @channellist_cmd;
-my @channellist = (0);
+# Fetch countries
+my @countrylist = &get_countrylist();
 
-if ( $wlanapsettings{'DRIVER'} eq 'NL80211' ){
-my $wiphy = `iw dev $INTF info | grep wiphy | cut -d" " -f2`;
-chomp $wiphy;
+# Show status
+&Header::opensection();
 
-(a)channellist_cmd = `iw phy phy$wiphy info | grep " MHz \\\[" | grep -v "(disabled)" | grep -v "no IBSS" | grep -v "no IR" | grep -v "passive scanning" 2>/dev/null`;
-# get available channels
+&Header::ServiceStatus({
+	"$Lang::tr{'wlanap'}" => {
+		"process" => "hostapd",
+	}
+});
+
+print <<EOF;
+	<table class="form">
+		<tr class="action">
+			<td>
+				<form method='post' action='$ENV{'SCRIPT_NAME'}'>
+					<input type='submit' name='ACTION' value='$Lang::tr{'start'}' />
+				</form>
+
+				<form method='post' action='$ENV{'SCRIPT_NAME'}'>
+					<input type='submit' name='ACTION' value='$Lang::tr{'stop'}' />
+				</form>
+			</td>
+		</tr>
+	</table>
+EOF
+
+&Header::closesection();
 
-my @temp;
-foreach (@channellist_cmd){
-$_ =~ /(.*) \[(\d+)(.*)\]/;
-$channel = $2;chomp $channel;
-if ( $channel =~ /\d+/ ){push(@temp,$channel + 0);}
-}
-push(@channellist, @temp);
-} else {
-(a)channellist_cmd = `iwlist $monwlaninterface channel|tail -n +2 2>/dev/null`;
-# get available channels
-
-my @temp;
-foreach (@channellist_cmd){
-$_ =~ /(.*)Channel (\d+)(.*):/;
-$channel = $2;chomp $channel;
-if ( $channel =~ /\d+/ ){push(@temp,$channel + 0);}
-}
-push(@channellist, @temp);
-}
+#
+# Configuration
+#
+&Header::openbox("100%", "center", $Lang::tr{'wlanap configuration'});
 
-# get available country codes
-open(FILE, "</lib/firmware/regulatorydb.txt");
-my @countrylist_cmd = <FILE>;
-close(FILE);
+print <<END;
+	<form method='post' action='$ENV{'SCRIPT_NAME'}'>
+		<h6>$Lang::tr{'wlanap configuration'}</h6>
 
+		<table class="form">
+			<tr>
+				<td>$Lang::tr{'wlanap interface'}</td>
 
-my @temp = "00";
-foreach (@countrylist_cmd){
-$_ =~ /country (.*):/;
-$country = $1;chomp $country;
-if ( $country =~ /[0,A-Z][0,A-Z]/ ) {push(@temp,$country);}
-}
-my @countrylist = @temp;
+				<td>
+					<select name="INTERFACE" required>
+END
 
-my @txpower_cmd = `iwlist $monwlaninterface txpower 2>/dev/null`;
-if ( $wlanapsettings{'DRIVER'} eq 'NL80211' ){
-	# There is a bug with NL80211 only all devices can displaye
-	@txpower_cmd = `iwlist txpower 2>/dev/null | sed -e "s|unknown transmit-power information.||g"`;
+foreach my $intf (sort keys %INTERFACES) {
+	print <<END;
+						<option value="$intf" $selected{'INTERFACE'}{$intf}>
+							$INTERFACES{$intf}
+						</option>
+END
 }
-# get available power
-
-$selected{'SYSLOGLEVEL'}{$wlanapsettings{'SYSLOGLEVEL'}} = "selected='selected'";
-$selected{'DEBUG'}{$wlanapsettings{'DEBUG'}} = "selected='selected'";
 
-#
-# Status box
-#
-&Header::openbox('100%', 'center', "WLAN AP");
-print <<END
-<table width='80%' cellspacing='1' class='tbl'>
+print <<END;
+					</select>
+				</td>
+			</tr>
+
+			<tr>
+				<td>$Lang::tr{'wlanap ssid'}</td>
+				<td>
+					<input type='text' name='SSID' value='$wlanapsettings{'SSID'}' required>
+				</td>
+			</tr>
+
+			<tr>
+				<td>$Lang::tr{'wlanap broadcast ssid'}</td>
+				<td>
+					<input type='checkbox' name='HIDESSID' $checked{'HIDESSID'}{'on'}>
+				</td>
+			</tr>
+
+			<tr>
+				<td>$Lang::tr{'wlanap client isolation'}</td>
+				<td>
+					<input type='checkbox' name='CLIENTISOLATION' $checked{'CLIENTISOLATION'}{'on'}>
+				</td>
+			</tr>
+
+			<tr>
+				<td>$Lang::tr{'wlanap country'}</td>
+				<td>
+					<select name="COUNTRY">
 END
-;
 
-if ( $wlan_card_status ne '' ){
-	print "<tr><th align='left' width='50%'><strong>$Lang::tr{'service'}</strong></th><th width='22%'>Status</th><th width='10%'>PID</th><th width='15%'>$Lang::tr{'memory'}</th><th colspan='2'width='5%'>$Lang::tr{'action'}</th></tr>";
-	print "<tr><td class='base'>$Lang::tr{'wlanap wlan card'} ($wlanapsettings{'DRIVER'})</td>";
-	print $wlan_card_status eq 'up' ? $status_started : $status_stopped;
-	print"<td colspan='4'></td></tr>";
-	print "<tr><td class='base' bgcolor='$color{'color22'}'>$Lang::tr{'wlanap'}</td>";
-	print $wlan_ap_status eq 'up' ? $status_started : $status_stopped;
-	if ( ($memory != 0) && (@pid[0] ne "///") ){
-		print "<td bgcolor='$color{'color22'}' align='center'>@pid[0]</td>";
-		print "<td bgcolor='$color{'color22'}' align='center'>$memory KB</td>";
-		print "<td bgcolor='$color{'color22'}'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='$Lang::tr{'start'}' /><input type='image' alt='$Lang::tr{'start'}' title='$Lang::tr{'start'}' src='/images/go-up.png' /></form></td>";
-		print "<td bgcolor='$color{'color22'}'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='$Lang::tr{'stop'}' /><input type='image' alt='$Lang::tr{'stop'}' title='$Lang::tr{'stop'}' src='/images/go-down.png' /></form></td>";
-	}else{
-		print"<td colspan='2' bgcolor='$color{'color22'}'></td>";
-		print "<td bgcolor='$color{'color22'}'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='$Lang::tr{'start'}' /><input type='image' alt='$Lang::tr{'start'}' title='$Lang::tr{'start'}' src='/images/go-up.png' /></form></td>";
-		print "<td bgcolor='$color{'color22'}'><form method='post' action='$ENV{'SCRIPT_NAME'}'><input type='hidden' name='ACTION' value='$Lang::tr{'stop'}' /><input type='image' alt='$Lang::tr{'stop'}' title='$Lang::tr{'stop'}' src='/images/go-down.png' /></form></td>";
-	}
-
-}else{
-	print "<tr><td class='base'>$message";
-}
-	print "</table>";
-
-if ( $wlan_card_status eq '' ){
-	print "<br />";
-	print "<table width='80%' cellspacing='0' border='0'>";
-	print "<tr align='center'>";
-	print "<td colspan='4'></td>";
-	print "</tr>";
-	print "<tr align='center'>";
-	print "<td width='40%'>&nbsp;</td>";
-	print "<td width='20%'><form method='post' action='/cgi-bin/wlanap.cgi'><input type='submit' name='ACTION' value='$Lang::tr{'wlanap del interface'}' /></form></td>";
-	print "<td width='20%'></td>";
-	print "<td width='20%'></td>";
-	print "</tr>";
-	print "</table>";
+foreach my $country (@countrylist){
+	print "					<option $selected{'COUNTRY'}{$country}>$country</option>";
 }
 
-if ( $wlan_card_status eq '' ){
-	&Header::closebox();
-	&Header::closebigbox();
-	&Header::closepage();
-	exit 0;
-}
-print <<END
-<br><br>
-<form method='post' action='$ENV{'SCRIPT_NAME'}'>
-<table width='80%' cellspacing='0' class='tbl' border='0'>
-<tr><th bgcolor='$color{'color20'}' colspan='4' align='left'><strong>$Lang::tr{'wlanap wlan settings'}</strong></th></tr>
-<tr><td colspan='4'><br></td></tr>
-<tr><td width='25%' class='base'>$Lang::tr{'wlanap ssid'}:&nbsp;</td><td class='base' colspan='3'><input type='text' name='SSID' size='30' value='$wlanapsettings{'SSID'}' /></td></tr>
-<!--SSID Broadcast: on => HIDESSID: off -->
-<tr><td width='25%' class='base'>$Lang::tr{'wlanap broadcast ssid'}:&nbsp;</td><td class='base' colspan='3'>$Lang::tr{'on'} <input type='radio' name='HIDESSID' value='off' $checked{'HIDESSID'}{'off'} /> | <input type='radio' name='HIDESSID' value='on' $checked{'HIDESSID'}{'on'} /> $Lang::tr{'off'}</td></tr>
-<tr><td width='25%' class='base'>$Lang::tr{'wlanap client isolation'}:&nbsp;</td><td class='base' colspan='3'>$Lang::tr{'on'} <input type='radio' name='CLIENTISOLATION' value='on' $checked{'CLIENTISOLATION'}{'on'} /> | <input type='radio' name='CLIENTISOLATION' value='off' $checked{'CLIENTISOLATION'}{'off'} /> $Lang::tr{'off'}</td></tr>
-<tr><td width='25%' class='base'>$Lang::tr{'wlanap country'}:&nbsp;</td><td class='base' colspan='3'>
-	<select name='COUNTRY'>
+print <<END;
+					</select>
+				</td>
+			</tr>
+
+			<tr>
+				<td>$Lang::tr{'wlanap wireless mode'}</td>
+				<td>
+					<select name='HW_MODE'>
+						<option value='a' $selected{'HW_MODE'}{'a'}>802.11a</option>
+						<option value='b' $selected{'HW_MODE'}{'b'}>802.11b</option>
+						<option value='g' $selected{'HW_MODE'}{'g'}>802.11g</option>
+						<option value='an' $selected{'HW_MODE'}{'an'}>802.11an</option>
+						<option value='gn' $selected{'HW_MODE'}{'gn'}>802.11gn</option>
+						<option value='ac' $selected{'HW_MODE'}{'ac'}>802.11ac</option>
+					</select>
+				</td>
+			</tr>
+
+			<tr>
+				<td>$Lang::tr{'wlanap channel'}</td>
+				<td>
+					<select name='CHANNEL'>
 END
-;
-foreach $country (@countrylist){
-	print "<option $selected{'COUNTRY'}{$country}>$country</option>";
-}
-print<<END
-</select></td></tr>
-<tr><td width='25%' class='base'>HW Mode:&nbsp;</td><td class='base' colspan='3'>
-	<select name='HW_MODE'>
-		<option value='a' $selected{'HW_MODE'}{'a'}>802.11a</option>
-		<option value='b' $selected{'HW_MODE'}{'b'}>802.11b</option>
-		<option value='g' $selected{'HW_MODE'}{'g'}>802.11g</option>
-		<option value='an' $selected{'HW_MODE'}{'an'}>802.11an</option>
-		<option value='gn' $selected{'HW_MODE'}{'gn'}>802.11gn</option>
-		<option value='ac' $selected{'HW_MODE'}{'ac'}>802.11ac</option>
-	</select>
-</td></tr>
-END
-;
 
-if ( scalar @channellist > 0 ){
-	print <<END
-<tr><td width='25%' class='base'>$Lang::tr{'wlanap channel'}:&nbsp;</td><td class='base' colspan='3'>
-	<select name='CHANNEL'>
-END
-;
-	foreach $channel (@channellist){
-		print "<option $selected{'CHANNEL'}{$channel}>";
-		if ($channel eq 0) {
-			print "- $Lang::tr{'wlanap auto'} -";
-		} else {
-			print $channel;
-		}
-		print "</option>";
+foreach my $channel (@channellist){
+	print "<option $selected{'CHANNEL'}{$channel}>";
+	if ($channel eq 0) {
+		print "- $Lang::tr{'wlanap auto'} -";
+	} else {
+		print $channel;
 	}
-	print "</select></td></tr>"
-} else {
-	print <<END
-<tr><td width='25%' class='base'>$Lang::tr{'wlanap channel'}:&nbsp;</td><td class='base' colspan='3'>
-<input type='text' name='CHANNEL' size='10' value='$wlanapsettings{'CHANNEL'}' />
-</td></tr>
-END
-;
+	print "</option>";
 }
-print<<END
-<tr><td width='25%' class='base'>$Lang::tr{'wlanap neighbor scan'}:&nbsp;</td><td class='base' >$Lang::tr{'on'} <input type='radio' name='NOSCAN' value='off' $checked{'NOSCAN'}{'off'} /> | <input type='radio' name='NOSCAN' value='on' $checked{'NOSCAN'}{'on'} /> $Lang::tr{'off'}</td><td class='base' colspan='2'>$Lang::tr{'wlanap neighbor scan warning'}</td></tr>
-<tr><td colspan='4'><br></td></tr>
-<tr><td width='25%' class='base'>$Lang::tr{'wlanap encryption'}:&nbsp;</td><td class='base' colspan='3'>
-	<select name='ENC'>
-		<option value='none' $selected{'ENC'}{'none'}>$Lang::tr{'wlanap none'}</option>
-		<option value='wpa1' $selected{'ENC'}{'wpa1'}>WPA1</option>
-		<option value='wpa2' $selected{'ENC'}{'wpa2'}>WPA2</option>
-		<option value='wpa3' $selected{'ENC'}{'wpa3'}>WPA3</option>
-		<option value='wpa1+2' $selected{'ENC'}{'wpa1+2'}>WPA1+2</option>
-		<option value='wpa2+3' $selected{'ENC'}{'wpa2+3'}>WPA2+3</option>
-	</select>
-</td></tr>
-<tr><td width='25%' class='base'>Passphrase:&nbsp;</td><td class='base' colspan='3'><input type='text' name='PWD' size='30' value='$wlanapsettings{'PWD'}' /></td></tr>
-<tr>
-	<td width='25%' class='base'>$Lang::tr{'wlanap management frame protection'}:&nbsp;</td>
-	<td class='base' colspan="3">
-		<select name="IEEE80211W">
-			<option value="off" $selected{'IEEE80211W'}{'off'}>$Lang::tr{'wlanap 802.11w disabled'}</option>
-			<option value="optional" $selected{'IEEE80211W'}{'optional'}>$Lang::tr{'wlanap 802.11w optional'}</option>
-			<option value="on" $selected{'IEEE80211W'}{'on'}>$Lang::tr{'wlanap 802.11w enforced'}</option>
-		</select>
-	</td>
-</tr>
-<tr><td colspan='4'><br></td></tr>
-END
-;
-print <<END
-<tr><td width='25%' class='base'>HT Caps:&nbsp;</td><td class='base' colspan='3'><input type='text' name='HTCAPS' size='30' value='$wlanapsettings{'HTCAPS'}' /></td></tr>
-<tr><td width='25%' class='base'>VHT Caps:&nbsp;</td><td class='base' colspan='3'><input type='text' name='VHTCAPS' size='30' value='$wlanapsettings{'VHTCAPS'}' /></td></tr>
-<tr><td width='25%' class='base'>Tx Power:&nbsp;</td><td class='base' colspan='3'><input type='text' name='TXPOWER' size='10' value='$wlanapsettings{'TXPOWER'}' /></td></tr>
-<tr><td width='25%' class='base'>Loglevel (hostapd):&nbsp;</td><td class='base' width='25%'>
-	<select name='SYSLOGLEVEL'>
-		<option value='0' $selected{'SYSLOGLEVEL'}{'0'}>0 ($Lang::tr{'wlanap verbose'})</option>
-		<option value='1' $selected{'SYSLOGLEVEL'}{'1'}>1 ($Lang::tr{'wlanap debugging'})</option>
-		<option value='2' $selected{'SYSLOGLEVEL'}{'2'}>2 ($Lang::tr{'wlanap informations'})</option>
-		<option value='3' $selected{'SYSLOGLEVEL'}{'3'}>3 ($Lang::tr{'wlanap notifications'})</option>
-		<option value='4' $selected{'SYSLOGLEVEL'}{'4'}>4 ($Lang::tr{'wlanap warnings'})</option>
-	</select>
-</td>
-<td width='25%' class='base'>Debuglevel (hostapd):&nbsp;</td><td class='base' width='25%'>
-	<select name='DEBUG'>
-		<option value='0' $selected{'DEBUG'}{'0'}>0 ($Lang::tr{'wlanap verbose'})</option>
-		<option value='1' $selected{'DEBUG'}{'1'}>1 ($Lang::tr{'wlanap debugging'})</option>
-		<option value='2' $selected{'DEBUG'}{'2'}>2 ($Lang::tr{'wlanap informations'})</option>
-		<option value='3' $selected{'DEBUG'}{'3'}>3 ($Lang::tr{'wlanap notifications'})</option>
-		<option value='4' $selected{'DEBUG'}{'4'}>4 ($Lang::tr{'wlanap warnings'})</option>
-	</select>
-</td></tr>
-<tr><td colspan='4'><br></td></tr>
-</table>
-END
-;
-if ( $INTF =~ /green0/ ){
-	print <<END
-<br />
-<table width='80%' cellspacing='0' class='tbl' border='1'>
-<tr>
-	<th colspan='3' align='left'>$Lang::tr{'mac filter'}</th>
-</tr>
-<td width='25%' class='base'>Mac Filter:&nbsp;</td><td class='base' width='25%'>
-	<select name='MACMODE'>
-		<option value='0' $selected{'MACMODE'}{'0'}>0 (off)</option>
-		<option value='1' $selected{'MACMODE'}{'1'}>1 (Accept MACs)</option>
-		<option value='2' $selected{'MACMODE'}{'2'}>2 (Deny MACs)</option>
-	</select>
-</td><td colspan='2'>Mac Adress List (one per line)<br /><textarea name='MACS' cols='20' rows='5' wrap='off'>
-END
-;
-	print `cat /var/ipfire/wlanap/macfile`;
-print <<END
-</textarea></td>
-</table>
+
+print <<END;
+					</select>
+				</td>
+			</tr>
+
+			<tr>
+				<td>$Lang::tr{'wlanap neighbor scan'}</td>
+				<td>
+					<input type='checkbox' name='NOSCAN' $checked{'NOSCAN'}{'on'}>
+
+					$Lang::tr{'wlanap neighbor scan warning'}
+				</td>
+			</tr>
+
+			<tr>
+				<td>$Lang::tr{'wlanap encryption'}</td>
+				<td>
+					<select name='ENC'>
+						<option value='none' $selected{'ENC'}{'none'}>$Lang::tr{'wlanap none'}</option>
+						<option value='wpa1' $selected{'ENC'}{'wpa1'}>WPA1</option>
+						<option value='wpa2' $selected{'ENC'}{'wpa2'}>WPA2</option>
+						<option value='wpa3' $selected{'ENC'}{'wpa3'}>WPA3</option>
+						<option value='wpa1+2' $selected{'ENC'}{'wpa1+2'}>WPA1+2</option>
+						<option value='wpa2+3' $selected{'ENC'}{'wpa2+3'}>WPA2+3</option>
+					</select>
+				</td>
+			</tr>
+
+			<tr>
+				<td>$Lang::tr{'wlanap psk'}</td>
+				<td>
+					<input type='text' name='PWD' value='$wlanapsettings{'PWD'}' />
+				</td>
+			</tr>
+
+			<tr>
+				<td>$Lang::tr{'wlanap management frame protection'}</td>
+				<td>
+					<select name="IEEE80211W">
+						<option value="off" $selected{'IEEE80211W'}{'off'}>
+							$Lang::tr{'wlanap 802.11w disabled'}
+						</option>
+						<option value="optional" $selected{'IEEE80211W'}{'optional'}>
+							$Lang::tr{'wlanap 802.11w optional'}
+						</option>
+						<option value="on" $selected{'IEEE80211W'}{'on'}>
+							$Lang::tr{'wlanap 802.11w enforced'}
+						</option>
+					</select>
+				</td>
+			</tr>
+
+			<tr>
+				<td>HT Caps</td>
+				<td>
+					<input type='text' name='HTCAPS' value='$wlanapsettings{'HTCAPS'}' />
+				</td>
+			</tr>
+
+			<tr>
+				<td>VHT Caps</td>
+				<td>
+					<input type='text' name='VHTCAPS' value='$wlanapsettings{'VHTCAPS'}' />
+				</td>
+			</tr>
+
+			<tr>
+				<td>Tx Power</td>
+				<td>
+					<input type='text' name='TXPOWER' value='$wlanapsettings{'TXPOWER'}' />
+				</td>
+			</tr>
+
+			<tr class="action">
+				<td colspan="2">
+					<input type='submit' name='ACTION' value='$Lang::tr{'save'}' />
+				</td>
+			</tr>
+		</table>
+	</form>
 END
 ;
-}
-print <<END
-<br />
-<table width='80%' cellspacing='0'>
-<tr><td align='center'>
-<form method='post' action='$ENV{'SCRIPT_NAME'}'>
-       <input type='submit' name='ACTION' value='$Lang::tr{'save'}' /></form></td>
-</tr>
-</table>
+
+&Header::closebox();
+
+&Header::opensection();
+
+my @status = `iw dev $INTF info`;
+
+if (@status) {
+	print <<END;
+		<h6>$Lang::tr{'wlanap wlan status'}</h6>
+
+		<pre>@status</pre>
 END
-;
-my @status;
-if ( $wlanapsettings{'DRIVER'} eq 'NL80211' ){
-	 @status =  `iw dev $INTF info && iw dev $INTF station dump && echo ""`;
 }
-print <<END
-<br />
-<table width='80%' cellspacing='0' class='tbl'>
-<tr><th colspan='3' bgcolor='$color{'color20'}' align='left'><strong>$Lang::tr{'wlanap wlan status'}</strong></th></tr>
-END
-;
 
-for (my $i=0;$i<$#status;$i++){
+my @status = `iw dev $INTF station dump`;
 
-if (@status[$i]=~"^Station ") { $count++; }
-if ($count % 2){
-		$col="bgcolor='$color{'color20'}'";
-	}else{
-		$col="bgcolor='$color{'color22'}'";
-	}
-	print"<tr><td colspan='3' $col><pre>@status[$i]</pre></td></tr>";
-	if (! @status[$i]=~"^/t" ) { $count++; }
-}
-	$count++;
+if (@status) {
+	print <<END;
+		<h6>$Lang::tr{'wlanap clients'}</h6>
 
-foreach my $nr (@channellist_cmd){
-	if ($count % 2){
-		$col="bgcolor='$color{'color20'}'";
-	}else{
-		$col="bgcolor='$color{'color22'}'";
-	}
-	print"<tr><td colspan='3' $col>$nr</td></tr>";
-	$count++;
+		<pre>@status</pre>
+END
 }
 
-for (my $i=0;$i<$#txpower_cmd;$i=$i+2){
-	if ($count % 2){
-		$col="bgcolor='$color{'color20'}'";
-	}else{
-		$col="bgcolor='$color{'color22'}'";
-	}
-	print "<tr><td $col>@txpower_cmd[$i]</td></tr>";
-	$count++;
-}
-print "</table>";
-&Header::closebox();
-print "</form>";
+&Header::closesection();
 &Header::closebigbox();
 &Header::closepage();
 
 sub WriteConfig_hostapd{
-	$wlanapsettings{'DRIVER_HOSTAPD'} = lc($wlanapsettings{'DRIVER'});
-
 	open (CONFIGFILE, ">/var/ipfire/wlanap/hostapd.conf");
 	print CONFIGFILE <<END
-driver=$wlanapsettings{'DRIVER_HOSTAPD'}
+driver=nl80211
 ######################### basic hostapd configuration ##########################
 #
 country_code=$wlanapsettings{'COUNTRY'}
+country3=0x49 # indoor
 ieee80211d=1
 ieee80211h=1
 channel=$wlanapsettings{'CHANNEL'}
+
+# Always advertise TPC
+local_pwr_constraint=3
+spectrum_mgmt_required=1
 END
 ;
  if ( $wlanapsettings{'HW_MODE'} eq 'an' ){
@@ -632,31 +435,26 @@ END
 
  }
 
-print CONFIGFILE <<END
+print CONFIGFILE <<END;
+# Enable logging
 logger_syslog=-1
-logger_syslog_level=$wlanapsettings{'SYSLOGLEVEL'}
-logger_stdout=-1
-logger_stdout_level=$wlanapsettings{'DEBUG'}
+logger_syslog_level=4
 auth_algs=1
 ctrl_interface=/var/run/hostapd
 ctrl_interface_group=0
 disassoc_low_ack=1
+
+# SSID
+ssid2=\"$wlanapsettings{'SSID'}\"
+utf8_ssid=1
+
 END
-;
- if ( $wlanapsettings{'HIDESSID'} eq 'on' ){
+
+if ( $wlanapsettings{'HIDESSID'} eq 'on' ){
 	print CONFIGFILE <<END
-ssid=$wlanapsettings{'SSID'}
 ignore_broadcast_ssid=2
 END
 ;
-
- }else{
- 	print CONFIGFILE <<END
-ssid=$wlanapsettings{'SSID'}
-ignore_broadcast_ssid=0
-END
-;
-
  }
 
  # https://forum.ipfire.org/viewtopic.php?f=22&t=12274&p=79070#p79070
@@ -743,12 +541,68 @@ END
 ;
  }
 	close CONFIGFILE;
+}
+
+sub get_phy($) {
+	my $intf = shift;
+	my $phy;
+
+	open(my $file, "/sys/class/net/$intf/phy80211/index") or return undef;
+
+	while (<$file>) {
+		chomp $_;
+
+		$phy = $_;
+		last;
+	}
+
+	close($file);
+
+	return $phy;
+}
+
+sub get_channellist($) {
+	my $intf = shift;
+
+	# Fetch the PHY ID
+	my $phy = &get_phy($intf);
 
-	open (MACFILE, ">/var/ipfire/wlanap/macfile");
-	foreach(@macs){
-		$_ =~ s/\r//gi;
-		chomp($_);
-		if ( $_ ne "" ){print MACFILE $_;}
+	my @channels = (0);
+
+	open(my $command, "iw phy phy$phy info |");
+
+	while (<$command>) {
+		# Skip everything we are not interested in
+		next unless ($_ =~ m/MHz \[(\d+)\]/);
+
+		my $channel = $1;
+
+		# Skip disabled and otherwise unusable channels
+		next if ($_ =~ m/disabled/);
+		next if ($_ =~ m/no IBSS/);
+		next if ($_ =~ m/no IR/);
+		next if ($_ =~ m/passive scanning/);
+
+		push(@channels, $channel);
 	}
-	close MACFILE;
+
+	close($command);
+
+	return @channels;
+}
+
+sub get_countrylist() {
+	open(my $file, "</lib/firmware/regulatorydb.txt");
+
+	my @countries = ();
+
+	while (<$file>)	{
+		if ($_ =~ m/^country ([A-Z0-9]{2}):/) {
+			push(@countries, $1);
+		}
+	}
+
+	close($file);
+
+	return @countries;
 }
diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css
index 18dfe347a..54d0f12e5 100644
--- a/html/html/themes/ipfire/include/css/style.css
+++ b/html/html/themes/ipfire/include/css/style.css
@@ -361,6 +361,10 @@ table.form tr.action td {
 	text-align: right;
 }
 
+table.form tr.action td form {
+	display: inline;
+}
+
 .tbl {
 	width: 100%;
 }
diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
index 89bef62f0..0004685a7 100644
--- a/langs/en/cgi-bin/en.pl
+++ b/langs/en/cgi-bin/en.pl
@@ -3076,7 +3076,7 @@
 'wlan client wpa mode ccmp tkip' => 'CCMP-TKIP',
 'wlan client wpa mode tkip tkip' => 'TKIP-TKIP',
 'wlan clients' => 'Wireless clients',
-'wlanap' => 'Access Point',
+'wlanap' => 'Wireless Access Point',
 'wlanap 802.11w disabled' => 'Disabled',
 'wlanap 802.11w enforced' => 'Enforced',
 'wlanap 802.11w optional' => 'Optional',
@@ -3084,30 +3084,33 @@
 'wlanap broadcast ssid' => 'Broadcast SSID',
 'wlanap channel' => 'Channel',
 'wlanap client isolation' => 'Client Isolation',
-'wlanap configuration' => 'Access Point Configuration',
+'wlanap configuration' => 'Wireless Access Point Configuration',
 'wlanap country' => 'Country Code',
 'wlanap debugging' => 'Debugging',
 'wlanap del interface' => 'Remove selected interface?',
 'wlanap encryption' => 'Encryption',
-'wlanap informations' => 'Informations',
-'wlanap interface' => 'Select interface',
-'wlanap invalid wpa' => 'Invalid length in WPA Passphrase. Must be between 8 and 63 characters.',
-'wlanap link dhcp' => 'Wireless lan DHCP configuration',
+'wlanap informations' => 'Information',
+'wlanap interface' => 'Select Interface',
+'wlanap invalid wpa' => 'Invalid length in WPA passphrase. Must be between 8 and 63 characters.',
+'wlanap link dhcp' => 'Wireless LAN DHCP configuration',
 'wlanap link wireless' => 'Activate wireless lan clients',
 'wlanap management frame protection' => 'Management Frame Protection (802.11w)',
-'wlanap neighbor scan' => 'Neighborhood scan',
-'wlanap neighbor scan warning' => 'Warning! Disabling may violate regulatory rules!',
+'wlanap neighbor scan' => 'Neighborhood Scan',
+'wlanap neighbor scan warning' => 'Warning: Disabling may violate regulatory rules',
 'wlanap no interface' => 'Selected interface is not a wirless lan card!',
 'wlanap none' => 'none',
-'wlanap notifications' => 'Notifications',
+'wlanap notifications' => 'Notification',
+'wlanap psk' => 'Pre-Shared Key',
 'wlanap select interface' => 'Please select the wireless lan interface.',
 'wlanap ssid' => 'SSID',
 'wlanap verbose' => 'Verbose',
 'wlanap warnings' => 'Warnings',
+'wlanap wireless mode' => 'Wireless Mode',
 'wlanap wlan card' => 'WLan Card',
-'wlanap wlan services' => 'WLan Services',
-'wlanap wlan settings' => 'WLan Settings',
-'wlanap wlan status' => 'WLan Status',
+'wlanap wlan clients' => 'WiFi Clients',
+'wlanap wlan services' => 'WiFi Services',
+'wlanap wlan settings' => 'WiFi Settings',
+'wlanap wlan status' => 'WiFi Status',
 'wol wakeup' => 'WakeUp',
 'workgroup' => 'Workgroup',
 'working' => 'Working',


hooks/post-receive
--
IPFire 2.x development tree

                 reply	other threads:[~2024-08-16 15:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4Wlly02VcZz2xT1@people01.haj.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox