summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorgnhb <gnoahb@gmail.com>2010-09-23 16:57:13 +0700
committergnhb <gnoahb@gmail.com>2010-09-23 16:57:13 +0700
commit58611e3a1da07a33c6cf65401ad3edf278190e75 (patch)
tree769b2f8a1a65eeed43fc4681ce94f5e6b611995c /usr/local
parent9ab9b745d1fe6e958cc519a80084178f9a6614d6 (diff)
downloadpfsense-58611e3a1da07a33c6cf65401ad3edf278190e75.zip
pfsense-58611e3a1da07a33c6cf65401ad3edf278190e75.tar.gz
Fixes #919 by properly saving <gateway> field as "dynamic"
`
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/system_gateways_edit.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index 597231d..b9ea2fe 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -192,7 +192,7 @@ if ($_POST) {
$save = false;
if (($_POST['weight'] && $_POST['weight'] > 1) ||
$_POST['latencylow'] || $_POST['latencyhigh'] || $_POST['losslow'] || $_POST['losshigh'] || $_POST['down'] ||
- $_POST['defaultgw'] || ($_POST['gateway'] && $_POST['gateway'] != "dynamic"))
+ $_POST['defaultgw'] || ($_POST['gateway'] && $_POST['gateway'] != "dynamic") || $_POST['monitor'])
$save = true;
/* if we are processing a system gateway only save the monitorip */
if (!$save && (empty($_POST['gateway']) || $_POST['gateway'] == "dynamic")) {
@@ -213,7 +213,10 @@ if ($_POST) {
$gateway = array();
$gateway['interface'] = $_POST['interface'];
- $gateway['gateway'] = $_POST['gateway'];
+ if (is_ipaddr($_POST['gateway']))
+ $gateway['gateway'] = $_POST['gateway'];
+ else
+ $gateway['gateway'] = "dynamic";
$gateway['name'] = $_POST['name'];
$gateway['weight'] = $_POST['weight'];
$gateway['descr'] = $_POST['descr'];
OpenPOWER on IntegriCloud