summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorsullrich <sullrich@pfsense.org>2009-11-29 17:57:18 -0500
committersullrich <sullrich@pfsense.org>2009-11-29 17:57:18 -0500
commit4909d1427a4cd531dbe4050d186cccbeaccb4174 (patch)
tree66bdf832c4a29a933b4b06ce0d92574b1d27b047 /etc/inc
parent1420c055beae5582ffa31437a8bf6cb8af4b4204 (diff)
downloadpfsense-4909d1427a4cd531dbe4050d186cccbeaccb4174.zip
pfsense-4909d1427a4cd531dbe4050d186cccbeaccb4174.tar.gz
Delete DHCP Server interfaces and do not leave XXXX based interfaces. Resolves #16
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pfsense-utils.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index a379906..6a43b71 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -2591,23 +2591,25 @@ function cleanup_opt_interfaces_after_removal($opt_interface_num) {
fwrite($fd, $config_file);
fclose($fd);
$config = parse_config(true);
- /* loop through and delete old rules */
+ unset($config['dhcpd']["optXXXX"]);
+ unset($config['dhcpd']["optxxxx"]);
+ unset($config['dhcpd']["opt$datetime"]);
$num_rules = count($config['filter']['rule']);
for($x = $num_rules; $x > 0; $x--) {
if($config['filter']['rule'][$x])
- if($config['filter']['rule'][$x]['interface'] == "optXXXX")
+ if(strtoupper($config['filter']['rule'][$x]['interface']) == "OPTXXXX")
unset($config['filter']['rule'][$x]['interface']);
}
$num_rules = count($config['nat']['advancedoutbound']['rule']);
for($x = $num_rules; $x > 0; $x--) {
if($config['nat']['advancedoutbound']['rule'][$x])
- if($config['nat']['advancedoutbound']['rule'][$x]['interface'] == "optXXXX")
+ if(strtoupper($config['nat']['advancedoutbound']['rule'][$x]['interface']) == "OPTXXXX")
unset($config['nat']['advancedoutbound']['rule'][$x]['interface']);
}
$num_rules = count($config['nat']['rule']);
for($x = $num_rules; $x > 0; $x--) {
if($config['nat']['rule'][$x])
- if($config['nat']['rule'][$x]['interface'] == "optXXXX")
+ if(strtoupper($config['nat']['rule'][$x]['interface']) == "OPTXXXX")
unset($config['nat']['rule'][$x]['interface']);
}
write_config();
OpenPOWER on IntegriCloud