summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-12-09 04:41:08 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-12-09 04:41:08 +0000
commit5d721fa0d83032a15862c7f390674e0a14f4f87f (patch)
tree5e4884e477f5bb2553387fd74993aaa94769463a
parentb8cfc022ad30673cd9109227ea6476366bea4758 (diff)
downloadpfsense-5d721fa0d83032a15862c7f390674e0a14f4f87f.zip
pfsense-5d721fa0d83032a15862c7f390674e0a14f4f87f.tar.gz
Move route delete items to system.inc so they are performed on every change
-rw-r--r--etc/inc/system.inc2
-rwxr-xr-xusr/local/www/system.php4
2 files changed, 2 insertions, 4 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 63a0dc3..e231fd1 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -144,11 +144,13 @@ function system_resolvconf_generate($dynupdate = false) {
if($config['system']['dns1gwint']) {
$if = $config['system']['dns1gwint'];
$gw = $config['interfaces'][$if]['if'];
+ exec("route delete {$syscfg['dnsserver'][0]}");
exec("route add {$syscfg['dnsserver'][0]} -gw {$gw}");
}
if($config['system']['dns2gwint']) {
$if = $config['system']['dns2gwint'];
$gw = $config['interfaces'][$if]['if'];
+ exec("route delete {$syscfg['dnsserver'][1]}");
exec("route add {$syscfg['dnsserver'][1]} -gw {$gw}");
}
diff --git a/usr/local/www/system.php b/usr/local/www/system.php
index f826389..04885d6 100755
--- a/usr/local/www/system.php
+++ b/usr/local/www/system.php
@@ -80,10 +80,6 @@ sort($timezonelist);
if ($_POST) {
$changecount++;
-
- /* remove old static route if exists */
- exec("route delete {$pconfig['dns1']}");
- exec("route delete {$pconfig['dns2']}");
unset($input_errors);
$pconfig = $_POST;
OpenPOWER on IntegriCloud