summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_pptp.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-04-28 17:49:46 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-04-28 17:49:46 +0000
commit64cc8755ca79a6e15234babdb887432ee8572564 (patch)
tree9f78669d43c95ec845015759599a1da8d3be6787 /usr/local/www/vpn_pptp.php
parent216cdc45adbb89e7aea2a8263fcb27cb06be226d (diff)
downloadpfsense-64cc8755ca79a6e15234babdb887432ee8572564.zip
pfsense-64cc8755ca79a6e15234babdb887432ee8572564.tar.gz
When PPTP server is turned off, remove any custom rules associated with it.
Diffstat (limited to 'usr/local/www/vpn_pptp.php')
-rwxr-xr-xusr/local/www/vpn_pptp.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/local/www/vpn_pptp.php b/usr/local/www/vpn_pptp.php
index 26449e7..b9659e5 100755
--- a/usr/local/www/vpn_pptp.php
+++ b/usr/local/www/vpn_pptp.php
@@ -96,6 +96,15 @@ if ($_POST) {
if (($_POST['redir'] && !is_ipaddr($_POST['redir']))) {
$input_errors[] = "A valid target address must be specified.";
}
+ } else {
+ /* turning pptp off, lets dump any custom rules */
+ $rules = &$config['filter']['rule'];
+ for($x=0; $x<count($rules); $x++) {
+ if($rules[$x]['interface'] == "pptp") {
+ unset($rules[$x]);
+ }
+ }
+ write_config();
}
if (!$input_errors) {
OpenPOWER on IntegriCloud