diff options
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/diag_dhcp_leases.php | 4 | ||||
-rwxr-xr-x | usr/local/www/services_dhcp.php | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/www/diag_dhcp_leases.php b/usr/local/www/diag_dhcp_leases.php index 21a4f70..bdf02c9 100755 --- a/usr/local/www/diag_dhcp_leases.php +++ b/usr/local/www/diag_dhcp_leases.php @@ -74,7 +74,7 @@ if (($_GET['deleteip']) && (is_ipaddr($_GET['deleteip']))) { /* Restart DHCP Service */ services_dhcpd_configure(); - header("Location: diag_dhcp_leases.php"); + header("Location: diag_dhcp_leases.php?all={$_GET['all']}"); } include("head.inc"); @@ -382,7 +382,7 @@ foreach ($leases as $data) { /* Only show the button for offline dynamic leases */ if (($data['type'] == "dynamic") && ($data['online'] != "online")) { - echo "<td class=\"list\" valign=\"middle\"><a href=\"diag_dhcp_leases.php?deleteip={$data['ip']}\">"; + echo "<td class=\"list\" valign=\"middle\"><a href=\"diag_dhcp_leases.php?deleteip={$data['ip']}&all={$_GET['all']}\">"; echo "<img src=\"/themes/{$g['theme']}/images/icons/icon_x.gif\" width=\"17\" height=\"17\" border=\"0\" title=\"delete this dhcp lease\"></a></td>\n"; } echo "</tr>\n"; diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php index 99651cb..7c94947 100755 --- a/usr/local/www/services_dhcp.php +++ b/usr/local/www/services_dhcp.php @@ -50,6 +50,8 @@ if(!$g['services_dhcp_server_enable']) { function dhcp_clean_leases() { global $g, $config; $leasesfile = "{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases"; + if (!file_exists($leasesfile)) + return; /* Build list of static MACs */ $staticmacs = array(); foreach($config['interfaces'] as $ifname => $ifarr) |