diff options
Diffstat (limited to 'usr/local/www/vpn_pptp.php')
-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) { |