diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-04-28 17:49:46 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-04-28 17:49:46 +0000 |
commit | 64cc8755ca79a6e15234babdb887432ee8572564 (patch) | |
tree | 9f78669d43c95ec845015759599a1da8d3be6787 /usr/local | |
parent | 216cdc45adbb89e7aea2a8263fcb27cb06be226d (diff) | |
download | pfsense-64cc8755ca79a6e15234babdb887432ee8572564.zip pfsense-64cc8755ca79a6e15234babdb887432ee8572564.tar.gz |
When PPTP server is turned off, remove any custom rules associated with it.
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/vpn_pptp.php | 9 |
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) { |