From b01e383e43c624b1d19c35575850b1fb66b29fd2 Mon Sep 17 00:00:00 2001 From: billz Date: Mon, 9 Aug 2021 06:25:41 +0100 Subject: [PATCH 1/6] Instantiate system class w/ namespace --- includes/hostapd.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/hostapd.php b/includes/hostapd.php index 3a528068..a41b320b 100755 --- a/includes/hostapd.php +++ b/includes/hostapd.php @@ -14,7 +14,7 @@ getWifiInterface(); function DisplayHostAPDConfig() { $status = new StatusMessages(); - $system = new System(); + $system = new \RaspAP\System\Sysinfo; $arrConfig = array(); $arr80211Standard = [ 'a' => '802.11a - 5 GHz', From 3145b6050ee55463bf99da96faf8f405ac3c58d6 Mon Sep 17 00:00:00 2001 From: billz Date: Mon, 9 Aug 2021 17:54:46 +0100 Subject: [PATCH 2/6] Legacy 802.11a UI support. Resolves #983 --- app/js/custom.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/js/custom.js b/app/js/custom.js index da92097d..e1925667 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -278,7 +278,9 @@ function loadChannelSelect(selected) { var countries_5Ghz_max48ch = data["5Ghz_max48ch"].countries; // Map selected hw_mode and country to determine channel list - if (($.inArray(country_code, countries_2_4Ghz_max11ch) !== -1) && (hw_mode !== 'ac') ) { + if (hw_mode === 'a') { + selectablechannels = data["5Ghz_max48ch"].channels; + } else if (($.inArray(country_code, countries_2_4Ghz_max11ch) !== -1) && (hw_mode !== 'ac') ) { selectablechannels = data["2_4GHz_max11ch"].channels; } else if (($.inArray(country_code, countries_2_4Ghz_max14ch) !== -1) && (hw_mode === 'b')) { selectablechannels = data["2_4GHz_max14ch"].channels; From 33dbaddcd94956dcab7780eb3c1a28e779144585 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 13:34:01 +0000 Subject: [PATCH 3/6] Bump path-parse from 1.0.6 to 1.0.7 Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1c57657b..0b90ec2f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3291,9 +3291,9 @@ path-is-absolute@^1.0.0: integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-root-regex@^0.1.0: version "0.1.2" From c24104008a4559df7da39d325e0eb30d0b0510b7 Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 7 Sep 2021 17:04:00 +0100 Subject: [PATCH 4/6] Pass $upstreamServers to template, resolves #994 thx @SephGER --- includes/dhcp.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/dhcp.php b/includes/dhcp.php index 9fd7e338..53a33535 100755 --- a/includes/dhcp.php +++ b/includes/dhcp.php @@ -52,6 +52,7 @@ function DisplayDHCPConfig() exec('cat '. RASPI_DNSMASQ_PREFIX.$ap_iface.'.conf', $return); $conf = array_merge(ParseConfig($return)); $hosts = (array)$conf['dhcp-host']; + $upstreamServers = (array)$conf['server']; exec("ip -o link show | awk -F': ' '{print $2}'", $interfaces); exec('cat ' . RASPI_DNSMASQ_LEASES, $leases); @@ -63,6 +64,7 @@ function DisplayDHCPConfig() "ap_iface", "conf", "hosts", + "upstreamServers", "interfaces", "leases" ) From 43088d3d1d6c58d610cba3f1251de8b93c7b96b6 Mon Sep 17 00:00:00 2001 From: smurphy Date: Fri, 24 Sep 2021 12:31:28 -0400 Subject: [PATCH 5/6] Fix for issue #1016 DHCP serves wrong Subnet Mask after updaiting in the webapp --- includes/dhcp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/dhcp.php b/includes/dhcp.php index 53a33535..7785ae4b 100755 --- a/includes/dhcp.php +++ b/includes/dhcp.php @@ -182,7 +182,7 @@ function updateDnsmasqConfig($iface,$status) $config = '# RaspAP '.$iface.' configuration'.PHP_EOL; $config .= 'interface='.$iface.PHP_EOL. 'dhcp-range='.$_POST['RangeStart'].','.$_POST['RangeEnd']. - ',255.255.255.0,'; + ','.$_POST['SubnetMask'].','; if ($_POST['RangeLeaseTimeUnits'] !== 'infinite') { $config .= $_POST['RangeLeaseTime']; } From 6c0b2d8b82d38c7666f3378eb08a8719307f8f11 Mon Sep 17 00:00:00 2001 From: smurphy Date: Fri, 24 Sep 2021 12:32:07 -0400 Subject: [PATCH 6/6] Fix for issue #1016 DHCP serves wrong Subnet Mask after updaiting in the webapp --- includes/dhcp.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/dhcp.php b/includes/dhcp.php index 7785ae4b..2329838b 100755 --- a/includes/dhcp.php +++ b/includes/dhcp.php @@ -180,9 +180,7 @@ function compareIPs($ip1, $ip2) function updateDnsmasqConfig($iface,$status) { $config = '# RaspAP '.$iface.' configuration'.PHP_EOL; - $config .= 'interface='.$iface.PHP_EOL. - 'dhcp-range='.$_POST['RangeStart'].','.$_POST['RangeEnd']. - ','.$_POST['SubnetMask'].','; + $config .= 'interface='.$iface.PHP_EOL.'dhcp-range='.$_POST['RangeStart'].','.$_POST['RangeEnd'].','.$_POST['SubnetMask'].','; if ($_POST['RangeLeaseTimeUnits'] !== 'infinite') { $config .= $_POST['RangeLeaseTime']; }