summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorVinicius Coque <vinicius.coque@bluepex.com>2011-07-11 09:02:41 -0300
committerVinicius Coque <vinicius.coque@bluepex.com>2011-07-11 09:02:41 -0300
commitfdbce60ca95237a817060301fe26f8ab72625711 (patch)
treeb3e40d838d8c2c15aebcfb8c9c72920beb9e6cae /usr
parentfab60c5e0d5e33259b5b622d3e659931b2aa7e63 (diff)
parent45d1024db3d3d32fb26f2b6c42460cbe98e24096 (diff)
downloadpfsense-fdbce60ca95237a817060301fe26f8ab72625711.zip
pfsense-fdbce60ca95237a817060301fe26f8ab72625711.tar.gz
Merge remote-tracking branch 'mainline/master' into inc
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php20
-rwxr-xr-xusr/local/www/services_dhcp.php6
-rwxr-xr-xusr/local/www/services_dhcp_relay.php2
-rw-r--r--usr/local/www/wizards/setup_wizard.xml2
4 files changed, 29 insertions, 1 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 97493bf..a100065 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -302,6 +302,26 @@ if ($_POST) {
$input_errors[] = sprintf(gettext("%s is not a valid start destination port. It must be a port alias or integer between 1 and 65535."),$_POST['dstbeginport']);
if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport']))
$input_errors[] = sprintf(gettext("%s is not a valid end destination port. It must be a port alias or integer between 1 and 65535."),$_POST['dstendport']);
+ if ( !$_POST['srcbeginport_cust'] && $_POST['srcendport_cust'])
+ if (is_alias($_POST['srcendport_cust']))
+ $input_errors[] = 'If you put port alias in Source port range to: field you must put the same port alias in from: field';
+ if ( $_POST['srcbeginport_cust'] && $_POST['srcendport_cust']){
+ if (is_alias($_POST['srcendport_cust']) && is_alias($_POST['srcendport_cust']) && $_POST['srcbeginport_cust'] != $_POST['srcendport_cust'])
+ $input_errors[] = 'The same port alias must be used in Source port range from: and to: fields';
+ if ((is_alias($_POST['srcbeginport_cust']) && (!is_alias($_POST['srcendport_cust']) && $_POST['srcendport_cust']!='')) ||
+ ((!is_alias($_POST['srcbeginport_cust']) && $_POST['srcbeginport_cust']!='') && is_alias($_POST['srcendport_cust'])))
+ $input_errors[] = 'You cannot specify numbers and port aliases at the same time in Source port range from: and to: field';
+ }
+ if ( !$_POST['dstbeginport_cust'] && $_POST['dstendport_cust'])
+ if (is_alias($_POST['dstendport_cust']))
+ $input_errors[] = 'If you put port alias in Destination port range to: field you must put the same port alias in from: field';
+ if ( $_POST['dstbeginport_cust'] && $_POST['dstendport_cust']){
+ if (is_alias($_POST['dstendport_cust']) && is_alias($_POST['dstendport_cust']) && $_POST['dstbeginport_cust'] != $_POST['dstendport_cust'])
+ $input_errors[] = 'The same port alias must be used in Destination port range from: and to: fields';
+ if ((is_alias($_POST['dstbeginport_cust']) && (!is_alias($_POST['dstendport_cust']) && $_POST['dstendport_cust']!='')) ||
+ ((!is_alias($_POST['dstbeginport_cust']) && $_POST['dstbeginport_cust']!='') && is_alias($_POST['dstendport_cust'])))
+ $input_errors[] = 'You cannot specify numbers and port aliases at the same time in Destination port range from: and to: field';
+ }
/* if user enters an alias and selects "network" then disallow. */
if($_POST['srctype'] == "network") {
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index d02fef6..17fbb80 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -216,6 +216,12 @@ if ($_POST) {
$input_errors[] = gettext("A valid IP address must be specified for the gateway.");
if (($_POST['wins1'] && !is_ipaddr($_POST['wins1'])) || ($_POST['wins2'] && !is_ipaddr($_POST['wins2'])))
$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary WINS servers.");
+ $parent_ip = get_interface_ip($_POST['if']);
+ if (is_ipaddr($parent_ip) && $_POST['gateway']) {
+ $parent_sn = get_interface_subnet($_POST['if']);
+ if(!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn) && !ip_in_interface_alias_subnet($_POST['if'], $_POST['gateway']))
+ $input_errors[] = sprintf(gettext("The gateway address %s does not lie within the chosen interface's subnet."), $_POST['gateway']);
+ }
if (($_POST['dns1'] && !is_ipaddr($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddr($_POST['dns2'])))
$input_errors[] = gettext("A valid IP address must be specified for the primary/secondary DNS servers.");
diff --git a/usr/local/www/services_dhcp_relay.php b/usr/local/www/services_dhcp_relay.php
index 37a9837..d0f1108 100755
--- a/usr/local/www/services_dhcp_relay.php
+++ b/usr/local/www/services_dhcp_relay.php
@@ -180,7 +180,7 @@ function enable_change(enable_over) {
<td width="78%" class="vtable">
<input name="server" type="text" class="formfld unknown" id="server" size="20" value="<?=htmlspecialchars($pconfig['server']);?>">
<br>
- <?=gettext("This is the IP address of the server to which the DHCP packet is relayed. You can enter multiple ip address server entries separated by commas. Select \"Proxy requests to DHCP server on WAN subnet\" to relay DHCP packets to the server that was used on the WAN interface.");?>
+ <?=gettext("This is the IP address of the server to which DHCP requests are relayed. You can enter multiple server IP addresses, separated by commas. Select \"Proxy requests to DHCP server on WAN subnet\" to relay DHCP packets to the server that was used on the WAN interface.");?>
</td>
</tr>
<tr>
diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml
index 401be3e..08870e1 100644
--- a/usr/local/www/wizards/setup_wizard.xml
+++ b/usr/local/www/wizards/setup_wizard.xml
@@ -590,6 +590,8 @@
}
unset($config['wizardtemp']);
write_config();
+ interface_reconfigure("wan");
+ interface_reconfigure("lan");
reload_all();
mwexec_bg("/etc/rc.update_bogons.sh now");
]]>
OpenPOWER on IntegriCloud