summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/interfaces.inc4
-rw-r--r--src/etc/inc/vpn.inc4
-rw-r--r--src/usr/local/www/services_dhcp_edit.php5
-rw-r--r--src/usr/local/www/services_ntpd_gps.php2
-rw-r--r--src/usr/local/www/services_pppoe_edit.php4
-rw-r--r--src/usr/local/www/system.php8
6 files changed, 11 insertions, 16 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index 2e1fce5..e40b0f7 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -3098,7 +3098,7 @@ function interface_mtu_wanted_for_pppoe($realif) {
continue;
}
- $ports = explode(',',$ppp['ports']);
+ $ports = explode(',', $ppp['ports']);
$mtu_wanted = 1500;
foreach ($ports as $pid => $port) {
if (get_real_interface($port) != $realif) {
@@ -3106,7 +3106,7 @@ function interface_mtu_wanted_for_pppoe($realif) {
}
if (!empty($ppp['mtu'])) {
- $mtus = explode(',',$ppp['mtu']);
+ $mtus = explode(',', $ppp['mtu']);
} else {
$mtus == array();
}
diff --git a/src/etc/inc/vpn.inc b/src/etc/inc/vpn.inc
index 50f0b01..8aa3cbd 100644
--- a/src/etc/inc/vpn.inc
+++ b/src/etc/inc/vpn.inc
@@ -1588,7 +1588,7 @@ function vpn_pppoe_configure(&$pppoecfg) {
for ($i = 0; $i < $pppoecfg['n_pppoe_units']; $i++) {
- $clientip = long2ip32(ip2long($pppoecfg['remoteip']) + $i);
+ $clientip = ip_after($pppoecfg['remoteip'], $i);
if (isset($pppoecfg['radius']['radiusissueips']) && isset($pppoecfg['radius']['server']['enable'])) {
$issue_ip_type = "set ipcp ranges {$pppoecfg['localip']}/32 0.0.0.0/0";
@@ -1827,7 +1827,7 @@ EOD;
for ($i = 0; $i < $l2tpcfg['n_l2tp_units']; $i++) {
- $clientip = long2ip32(ip2long($l2tpcfg['remoteip']) + $i);
+ $clientip = ip_after($l2tpcfg['remoteip'], $i);
if (isset ($l2tpcfg['radius']['radiusissueips']) && isset ($l2tpcfg['radius']['enable'])) {
$issue_ip_type = "set ipcp ranges {$l2tpcfg['localip']}/32 0.0.0.0/0";
diff --git a/src/usr/local/www/services_dhcp_edit.php b/src/usr/local/www/services_dhcp_edit.php
index 303833c..515245d 100644
--- a/src/usr/local/www/services_dhcp_edit.php
+++ b/src/usr/local/www/services_dhcp_edit.php
@@ -238,10 +238,7 @@ if ($_POST) {
/* make sure it's not within the dynamic subnet */
if ($_POST['ipaddr']) {
- $dynsubnet_start = ip2ulong($config['dhcpd'][$if]['range']['from']);
- $dynsubnet_end = ip2ulong($config['dhcpd'][$if]['range']['to']);
- if ((ip2ulong($_POST['ipaddr']) >= $dynsubnet_start) &&
- (ip2ulong($_POST['ipaddr']) <= $dynsubnet_end)) {
+ if (is_inrange_v4($_POST['ipaddr']), $config['dhcpd'][$if]['range']['from'], $config['dhcpd'][$if]['range']['to'])) {
$input_errors[] = sprintf(gettext("The IP address must not be within the DHCP range for this interface."));
}
diff --git a/src/usr/local/www/services_ntpd_gps.php b/src/usr/local/www/services_ntpd_gps.php
index 5b68470..f319d45 100644
--- a/src/usr/local/www/services_ntpd_gps.php
+++ b/src/usr/local/www/services_ntpd_gps.php
@@ -380,7 +380,7 @@ $btnadvgps->removeClass('btn-primary')->addClass('btn-default btn-sm');
$section->addInput(new Form_StaticText(
'GPS Initialization',
- $btnadvgps . '&nbsp' . 'Show GPS Initialization commands'
+ $btnadvgps . '&nbsp;' . 'Show GPS Initialization commands'
));
$section->addInput(new Form_Textarea(
diff --git a/src/usr/local/www/services_pppoe_edit.php b/src/usr/local/www/services_pppoe_edit.php
index 6fe3579..70e2b26 100644
--- a/src/usr/local/www/services_pppoe_edit.php
+++ b/src/usr/local/www/services_pppoe_edit.php
@@ -160,9 +160,7 @@ if ($_POST) {
if (!is_numericint($_POST['n_pppoe_units']) || $_POST['n_pppoe_units'] > 255) {
$input_errors[] = gettext("Number of PPPoE users must be between 1 and 255");
}
- if (!is_numeric($_POST['pppoe_subnet']) ||
- $_POST['pppoe_subnet'] < 0 ||
- $_POST['pppoe_subnet'] > 32) {
+ if (!is_numericint($_POST['pppoe_subnet']) || $_POST['pppoe_subnet'] > 32) {
$input_errors[] = gettext("Subnet mask must be an interger between 0 and 32");
}
diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php
index a69cb78..cb84861 100644
--- a/src/usr/local/www/system.php
+++ b/src/usr/local/www/system.php
@@ -406,7 +406,7 @@ for ($i=1; $i<5; $i++) {
$group->add(new Form_Select(
'dns' . $i . 'gw',
- null,
+ 'Gateway',
$pconfig['dns' . $i . 'gw'],
$options
))->setHelp(($i == 4) ? 'Gateway':null);;
@@ -427,7 +427,7 @@ $section->addInput(new Form_Checkbox(
'DNS server override',
'Allow DNS server list to be overridden by DHCP/PPP on WAN',
$pconfig['dnsallowoverride']
-))->setHelp(sprintf(gettext('If this option is set, %s will use DNS servers'.
+))->setHelp(sprintf(gettext('If this option is set, %s will use DNS servers '.
'assigned by a DHCP/PPP server on WAN for its own purposes (including '.
'the DNS forwarder). However, they will not be assigned to DHCP and PPTP '.
'VPN clients.'), $g['product_name']));
@@ -437,9 +437,9 @@ $section->addInput(new Form_Checkbox(
'Disable DNS forwarder',
'Do not use the DNS Forwarder as a DNS server for the firewall',
$pconfig['dnslocalhost']
-))->setHelp('By default localhost (127.0.0.1) will be used as the first DNS'.
+))->setHelp('By default localhost (127.0.0.1) will be used as the first DNS '.
'server where the DNS Forwarder or DNS Resolver is enabled and set to '.
- 'listen on Localhost, so system can use the local DNS service to perform'.
+ 'listen on Localhost, so system can use the local DNS service to perform '.
'lookups. Checking this box omits localhost from the list of DNS servers.');
$form->add($section);
OpenPOWER on IntegriCloud