diff options
author | jim-p <jimp@pfsense.org> | 2012-06-27 16:51:31 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-06-27 16:55:25 -0400 |
commit | 198ac406ed9c26dba2839371ac242769007d69d1 (patch) | |
tree | 87a96713c092e3ceb9ac72941de7b8950518387b /usr/local | |
parent | 9a202d6277b4b5d86e16a4fc2b86274cc78f5c70 (diff) | |
download | pfsense-198ac406ed9c26dba2839371ac242769007d69d1.zip pfsense-198ac406ed9c26dba2839371ac242769007d69d1.tar.gz |
LAN is not special here anymore. Do not remove the interface again (it was alraedy removed before this block), do not remove NAT and such (OPTs may still need it!) and no need to remove shaper. Improve DHCP check and generalize it to work on any interface, not just LAN.
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/interfaces_assign.php | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index d8f5511..8b1f315 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -273,15 +273,9 @@ if ($_GET['act'] == "del") { unset($config['interfaces'][$id]); /* delete the specified OPTn or LAN*/ - if($id == "lan") { - unset($config['interfaces']['lan']); - if (is_array($config['dhcpd'])) - unset($config['dhcpd']['lan']); - unset($config['shaper']); - unset($config['ezshaper']); - unset($config['nat']); - system("rm /var/dhcpd/var/db/*"); - services_dhcpd_configure(); + if (is_array($config['dhcpd']) && is_array($config['dhcpd'][$id])) { + unset($config['dhcpd'][$id]); + services_dhcpd_configure(); } if (count($config['filter']['rule']) > 0) { |