summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dhcp.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-02-12 00:06:44 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-02-12 00:06:44 +0000
commitd378c59ba314838a95133d6ec4c208c9700006e6 (patch)
treef9eb6032b1d0250b6cf5dfa069ff7002b545dd44 /usr/local/www/services_dhcp.php
parent54c47ec512be987e7c31d662cb7da9a3abaaa80e (diff)
downloadpfsense-d378c59ba314838a95133d6ec4c208c9700006e6.zip
pfsense-d378c59ba314838a95133d6ec4c208c9700006e6.tar.gz
Remove previous leases when toggling failover dhcp option
Diffstat (limited to 'usr/local/www/services_dhcp.php')
-rwxr-xr-xusr/local/www/services_dhcp.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index defcdcf..6b9736b 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -140,6 +140,10 @@ if ($_POST) {
$config['dhcpd'][$if]['range']['to'] = $_POST['range_to'];
$config['dhcpd'][$if]['defaultleasetime'] = $_POST['deftime'];
$config['dhcpd'][$if]['maxleasetime'] = $_POST['maxtime'];
+ $previous = $config['dhcpd'][$if]['failover_peerip'];
+ if($previous <> $_POST['failover_peerip']) {
+ mwexec("rm -rf /var/dhcpd/var/db/*");
+ }
$config['dhcpd'][$if]['failover_peerip'] = $_POST['failover_peerip'];
unset($config['dhcpd'][$if]['winsserver']);
OpenPOWER on IntegriCloud