summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfSense.org>2009-12-23 17:24:30 -0500
committerScott Ullrich <sullrich@pfSense.org>2009-12-23 17:24:30 -0500
commit15a13dab10739901bac09f104534dbb7f2d52e89 (patch)
treef49a5887312b1f6fb82516148bcf16953ee63b15
parent204f33f6d8137f9fd67ebd885b8a87ab029ffceb (diff)
downloadpfsense-15a13dab10739901bac09f104534dbb7f2d52e89.zip
pfsense-15a13dab10739901bac09f104534dbb7f2d52e89.tar.gz
Unbreak adding gateway #238
-rwxr-xr-xusr/local/www/interfaces.php1
-rwxr-xr-xusr/local/www/system_gateways_edit.php3
2 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 124be43..bb9b247 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -1497,6 +1497,7 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "pppoe"
var defaultgw = $('defaultgw').getValue();
var url = "system_gateways_edit.php";
var pars = 'isAjax=true&defaultgw=' + escape(defaultgw) + '&interface=' + escape(iface) + '&name=' + escape(name) + '&descr=' + escape(descr) + '&gateway=' + escape(gatewayip) + '&type=' + escape(addrtype);
+ alert(pars);
var myAjax = new Ajax.Request(
url,
{
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index 20f303d..809ef84 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -93,7 +93,8 @@ if ($_POST) {
if (($_POST['gateway'] && (!is_ipaddr($_POST['gateway'])) && ($pconfig['attribute'] != "system")) && (! $_POST['gateway'] == "dynamic")) {
$input_errors[] = "A valid gateway IP address must be specified.";
}
- if ($_POST['gateway'] && (is_ipaddr($_POST['gateway'])) && ($pconfig['attribute'] != "system")) {
+
+ if ($_POST['gateway'] && (is_ipaddr($_POST['gateway'])) && ($pconfig['attribute'] != "system") && !$_REQUEST['isAjax']) {
$parent_ip = get_interface_ip($_POST['interface']);
$parent_sn = get_interface_subnet($_POST['interface']);
if(!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn)) {
OpenPOWER on IntegriCloud