diff --git a/ajax/networking/get_netcfg.php b/ajax/networking/get_netcfg.php
index 2dd330bb..7e7b8fa7 100644
--- a/ajax/networking/get_netcfg.php
+++ b/ajax/networking/get_netcfg.php
@@ -45,12 +45,14 @@ if (isset($interface)) {
preg_match('/static\srouters=(.*)/', $matched[0], $static_routers);
preg_match('/static\sdomain_name_server=(.*)/', $matched[0], $static_dns);
preg_match('/fallback\sstatic_'.$interface.'/', $matched[0], $fallback);
+ preg_match('/(?:no)?gateway/', $matched[0], $gateway);
$dhcpdata['Metric'] = $metric[1];
$dhcpdata['StaticIP'] = strpos($static_ip[1],'/') ? substr($static_ip[1], 0, strpos($static_ip[1],'/')) : $static_ip[1];
$dhcpdata['SubnetMask'] = cidr2mask($static_ip[1]);
$dhcpdata['StaticRouters'] = $static_routers[1];
$dhcpdata['StaticDNS'] = $static_dns[1];
$dhcpdata['FallbackEnabled'] = empty($fallback) ? false: true;
+ $dhcpdata['DefaultRoute'] = empty($gateway) || $gateway[0] == "gateway";
echo json_encode($dhcpdata);
}
diff --git a/app/css/custom.php b/app/css/custom.php
index a4f98d72..6726a0a8 100644
--- a/app/css/custom.php
+++ b/app/css/custom.php
@@ -119,8 +119,9 @@ i.fa.fa-bars:hover{
}
.info-item {
- width: 10rem;
- float: left;
+ text-transform: uppercase;
+ font-size: 0.7em;
+ color: #858796;
}
.info-item-xs {
diff --git a/app/css/hackernews.css b/app/css/hackernews.css
index f2c68cbf..2d76492c 100644
--- a/app/css/hackernews.css
+++ b/app/css/hackernews.css
@@ -150,8 +150,9 @@ ul.nav-tabs, .nav-tabs .nav-link {
}
.info-item {
- width: 10rem;
- float: left;
+ text-transform: uppercase;
+ font-size: 0.7em;
+ color: #858796;
}
.info-item-xs {
diff --git a/app/css/lightsout.css b/app/css/lightsout.css
index ce44a4cd..cc020f22 100644
--- a/app/css/lightsout.css
+++ b/app/css/lightsout.css
@@ -249,8 +249,9 @@ hr {
}
.info-item {
- width: 12rem;
- float: left;
+ text-transform: uppercase;
+ font-size: 0.7em;
+ color: #858796;
}
.info-item-xs {
diff --git a/app/js/custom.js b/app/js/custom.js
index d5047558..838d0cbb 100644
--- a/app/js/custom.js
+++ b/app/js/custom.js
@@ -186,6 +186,7 @@ function loadInterfaceDHCPSelect() {
$('#txtsubnetmask').val(jsonData.SubnetMask);
$('#txtgateway').val(jsonData.StaticRouters);
$('#chkfallback')[0].checked = jsonData.FallbackEnabled;
+ $('#default-route').prop('checked', jsonData.DefaultRoute);
$('#txtrangestart').val(jsonData.RangeStart);
$('#txtrangeend').val(jsonData.RangeEnd);
$('#txtrangeleasetime').val(jsonData.leaseTime);
diff --git a/config/50-raspap-router.conf b/config/50-raspap-router.conf
index c7634436..1c10d26f 100644
--- a/config/50-raspap-router.conf
+++ b/config/50-raspap-router.conf
@@ -3,7 +3,7 @@ server.modules += (
)
$HTTP["url"] =~ "^/REPLACE_ME/(?!(dist|app|ajax|config)).*" {
- url.rewrite-once = ( "^/REPLACE_ME/(.*?)(\?.+)?$"=>"/REPLACE_ME/index.php/$1?$2" )
+ url.rewrite-once = ( "^/REPLACE_ME/(.*?)(\?.+)?$"=>"/REPLACE_ME/index.php/$1$2" )
server.error-handler-404 = "/REPLACE_ME/index.php"
}
diff --git a/includes/dhcp.php b/includes/dhcp.php
index d4f981ed..bf109da2 100755
--- a/includes/dhcp.php
+++ b/includes/dhcp.php
@@ -247,6 +247,7 @@ function updateDHCPConfig($iface,$status)
$cfg[] = 'profile static_'.$iface;
$cfg[] = 'fallback static_'.$iface;
}
+ $cfg[] = $_POST['DefaultRoute'] == '1' ? 'gateway' : 'nogateway';
$dhcp_cfg = file_get_contents(RASPI_DHCPCD_CONFIG);
if (!preg_match('/^interface\s'.$iface.'$/m', $dhcp_cfg)) {
$cfg[] = PHP_EOL;
diff --git a/includes/hostapd.php b/includes/hostapd.php
index 43e04bd1..e364dd15 100755
--- a/includes/hostapd.php
+++ b/includes/hostapd.php
@@ -27,6 +27,8 @@ function DisplayHostAPDConfig()
$arrEncType = array('TKIP' => 'TKIP', 'CCMP' => 'CCMP', 'TKIP CCMP' => 'TKIP+CCMP');
$managedModeEnabled = false;
exec("ip -o link show | awk -F': ' '{print $2}'", $interfaces);
+ sort($interfaces);
+
exec("iw reg get | awk '/country / { sub(/:/,\"\",$2); print $2 }'", $country_code);
if (!RASPI_MONITOR_ENABLED) {
diff --git a/locale/en_US/LC_MESSAGES/messages.po b/locale/en_US/LC_MESSAGES/messages.po
index 74627378..ac7086b4 100644
--- a/locale/en_US/LC_MESSAGES/messages.po
+++ b/locale/en_US/LC_MESSAGES/messages.po
@@ -380,6 +380,9 @@ msgstr "Clients with a particular hardware MAC address can always be allocated t
msgid "This option adds dhcp-host
entries to the dnsmasq configuration."
msgstr "This option adds dhcp-host
entries to the dnsmasq configuration."
+msgid "This toggles the gateway
/nogateway
option for this interface in the DHCPCD configuration."
+msgstr "This toggles the gateway
/nogateway
option for this interface in the DHCPCD configuration."
+
#: includes/hostapd.php
msgid "Basic"
msgstr "Basic"
diff --git a/templates/dashboard.php b/templates/dashboard.php
index ab1d3d8f..47443ee8 100755
--- a/templates/dashboard.php
+++ b/templates/dashboard.php
@@ -21,7 +21,7 @@