diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-06-23 23:57:56 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-06-23 23:57:56 +0000 |
commit | c3bc74322359a0aeb664cb848d3b5852225205ba (patch) | |
tree | ae1623aaf6274ed0d99f9b175ff3e49570293623 | |
parent | d59557dc2220ce9fdfe9962d18c50c5b93bc66df (diff) | |
download | pfsense-c3bc74322359a0aeb664cb848d3b5852225205ba.zip pfsense-c3bc74322359a0aeb664cb848d3b5852225205ba.tar.gz |
Missed rule removal commit.
-rwxr-xr-x | usr/local/www/interfaces_assign.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index fde4be9..4d08094 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -151,7 +151,6 @@ if ($_POST['apply']) { if ($_GET['act'] == "del") { $id = $_GET['id']; - $i = substr($id, 3); /* the number of the OPTn port being deleted */ unset($config['interfaces'][$id]['enable']); interfaces_optional_configure_if($id); /* down the interface */ @@ -167,6 +166,23 @@ if ($_GET['act'] == "del") { services_dhcpd_configure(); } + if ($config['filter']['rule'] > 0) + foreach ($config['filter']['rule'] as $x => $rule) { + if($rule['interface'] == $id) + unset($config['filter']['rule'][$x]); + } + if ($config['nat']['advancedoutbound']['rule'] > 0) + foreach ($config['nat']['advancedoutbound']['rule'] as $id => $rule) { + if($rule['interface'] == $x) + unset($config['nat']['advancedoutbound']['rule'][$x]['interface']); + } + if (count($config['nat']['rule']) > 0) + foreach ($config['nat']['rule'] as $x => $rule) { + if($rule['interface'] == $id) + unset($config['nat']['rule'][$x]['interface']); + } + + write_config(); /* XXX: What is this for?!?! */ |