From b1c525eed2e1958ffa4ab16d9622ee2316ecd3aa Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 5 Sep 2006 21:54:02 +0000 Subject: Unlink config.cache before reloading. It somehow spoils the FTP helper from being loaded. --- usr/local/www/interfaces.php | 30 ++++++++++++++++-------------- usr/local/www/interfaces_wan.php | 30 ++++++++++++++++-------------- 2 files changed, 32 insertions(+), 28 deletions(-) (limited to 'usr') diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index f9d8363..fb1a28a 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -4,7 +4,7 @@ interfaces_wan.php Copyright (C) 2004 Scott Ullrich All rights reserved. - + originally part of m0n0wall (http://m0n0.ch/wall) Copyright (C) 2003-2004 Manuel Kasper . All rights reserved. @@ -207,7 +207,7 @@ if ($_POST) { if($bridge <> "-1") { destroy_bridge($bridge); } - + unset($wancfg['ipaddr']); unset($wancfg['subnet']); unset($config['interfaces']['wan']['gateway']); @@ -231,12 +231,12 @@ if ($_POST) { unset($config['bigpond']['authdomain']); unset($config['bigpond']['minheartbeatinterval']); unset($wancfg['disableftpproxy']); - + /* per interface pftpx helper */ if($_POST['disableftpproxy'] == "yes") { $wancfg['disableftpproxy'] = true; system_start_ftp_helpers(); - } else { + } else { system_start_ftp_helpers(); } @@ -278,12 +278,12 @@ if ($_POST) { $wancfg['blockpriv'] = true; else unset($wancfg['blockpriv']); - + if($_POST['blockbogons'] == "yes") $wancfg['blockbogons'] = true; else unset($wancfg['blockbogons']); - + $wancfg['spoofmac'] = $_POST['spoofmac']; $wancfg['mtu'] = $_POST['mtu']; @@ -479,7 +479,7 @@ function type_change(enable_change,enable_change_pptp) { $mac = `/usr/sbin/arp -an | grep {$ip} | cut -d" " -f4`; $mac = str_replace("\n","",$mac); ?> - Copy my MAC address + Copy my MAC address
This field can be used to modify ("spoof") the MAC address of the WAN interface
@@ -661,7 +661,7 @@ function type_change(enable_change,enable_change_pptp) { FTP Helper - + FTP Helper @@ -698,7 +698,7 @@ function type_change(enable_change,enable_change_pptp) { are reserved (but not RFC 1918) or not yet assigned by IANA.
Bogons are prefixes that should never appear in the Internet routing table, and obviously should not appear as the source address in any packets you receive. - +    
@@ -721,15 +721,17 @@ type_change(); if ($_POST) { if (!$input_errors) { - + + unlink_if_exists("{$g['tmp_path']}/config.cache"); + ob_flush(); flush(); - sleep(1); - + sleep(1); + interfaces_wan_configure(); - + reset_carp(); - + /* sync filter configuration */ filter_configure(); } diff --git a/usr/local/www/interfaces_wan.php b/usr/local/www/interfaces_wan.php index f9d8363..fb1a28a 100755 --- a/usr/local/www/interfaces_wan.php +++ b/usr/local/www/interfaces_wan.php @@ -4,7 +4,7 @@ interfaces_wan.php Copyright (C) 2004 Scott Ullrich All rights reserved. - + originally part of m0n0wall (http://m0n0.ch/wall) Copyright (C) 2003-2004 Manuel Kasper . All rights reserved. @@ -207,7 +207,7 @@ if ($_POST) { if($bridge <> "-1") { destroy_bridge($bridge); } - + unset($wancfg['ipaddr']); unset($wancfg['subnet']); unset($config['interfaces']['wan']['gateway']); @@ -231,12 +231,12 @@ if ($_POST) { unset($config['bigpond']['authdomain']); unset($config['bigpond']['minheartbeatinterval']); unset($wancfg['disableftpproxy']); - + /* per interface pftpx helper */ if($_POST['disableftpproxy'] == "yes") { $wancfg['disableftpproxy'] = true; system_start_ftp_helpers(); - } else { + } else { system_start_ftp_helpers(); } @@ -278,12 +278,12 @@ if ($_POST) { $wancfg['blockpriv'] = true; else unset($wancfg['blockpriv']); - + if($_POST['blockbogons'] == "yes") $wancfg['blockbogons'] = true; else unset($wancfg['blockbogons']); - + $wancfg['spoofmac'] = $_POST['spoofmac']; $wancfg['mtu'] = $_POST['mtu']; @@ -479,7 +479,7 @@ function type_change(enable_change,enable_change_pptp) { $mac = `/usr/sbin/arp -an | grep {$ip} | cut -d" " -f4`; $mac = str_replace("\n","",$mac); ?> - Copy my MAC address + Copy my MAC address
This field can be used to modify ("spoof") the MAC address of the WAN interface
@@ -661,7 +661,7 @@ function type_change(enable_change,enable_change_pptp) { FTP Helper - + FTP Helper @@ -698,7 +698,7 @@ function type_change(enable_change,enable_change_pptp) { are reserved (but not RFC 1918) or not yet assigned by IANA.
Bogons are prefixes that should never appear in the Internet routing table, and obviously should not appear as the source address in any packets you receive. - +    
@@ -721,15 +721,17 @@ type_change(); if ($_POST) { if (!$input_errors) { - + + unlink_if_exists("{$g['tmp_path']}/config.cache"); + ob_flush(); flush(); - sleep(1); - + sleep(1); + interfaces_wan_configure(); - + reset_carp(); - + /* sync filter configuration */ filter_configure(); } -- cgit v1.1