diff options
author | Scott Ullrich <sullrich@pfSense.org> | 2009-12-23 17:24:30 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfSense.org> | 2009-12-23 17:24:30 -0500 |
commit | 15a13dab10739901bac09f104534dbb7f2d52e89 (patch) | |
tree | f49a5887312b1f6fb82516148bcf16953ee63b15 | |
parent | 204f33f6d8137f9fd67ebd885b8a87ab029ffceb (diff) | |
download | pfsense-15a13dab10739901bac09f104534dbb7f2d52e89.zip pfsense-15a13dab10739901bac09f104534dbb7f2d52e89.tar.gz |
Unbreak adding gateway #238
-rwxr-xr-x | usr/local/www/interfaces.php | 1 | ||||
-rwxr-xr-x | usr/local/www/system_gateways_edit.php | 3 |
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)) { |