diff --git a/src/www/status_dhcp_leases.php b/src/www/status_dhcp_leases.php
index 33b971b0c..e52a0a280 100644
--- a/src/www/status_dhcp_leases.php
+++ b/src/www/status_dhcp_leases.php
@@ -74,6 +74,7 @@ function remove_duplicate($array, $field)
return $new;
}
+$interfaces = legacy_config_get_interfaces(array('virtual' => false));
$leasesfile = services_dhcpd_leasesfile();
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
@@ -226,7 +227,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
asort($pools);
}
- foreach (legacy_config_get_interfaces(array("virtual" => false)) as $ifname => $ifarr) {
+ foreach ($interfaces as $ifname => $ifarr) {
if (isset($config['dhcpd'][$ifname]['staticmap'])) {
foreach($config['dhcpd'][$ifname]['staticmap'] as $static) {
$slease = array();
@@ -355,6 +356,7 @@ include("head.inc");?>
+ | =gettext("Interface"); ?> |
=gettext("IP address"); ?> |
=gettext("MAC address"); ?> |
=gettext("Hostname"); ?> |
@@ -386,6 +388,7 @@ include("head.inc");?>
if(is_array($dhcpifconf['staticmap'])) {
foreach ($dhcpifconf['staticmap'] as $staticent) {
if ($data['ip'] == $staticent['ipaddr']) {
+ $data['int'] = htmlspecialchars($interfaces[$dhcpif]['descr']);
$data['if'] = $dhcpif;
break;
}
@@ -402,6 +405,7 @@ include("head.inc");?>
continue;
}
if (($lip >= ip2ulong($dhcpifconf['range']['from'])) && ($lip <= ip2ulong($dhcpifconf['range']['to']))) {
+ $data['int'] = htmlspecialchars($interfaces[$dhcpif]['descr']);
$data['if'] = $dhcpif;
break;
}
@@ -410,6 +414,7 @@ include("head.inc");?>
$mac_hi = strtoupper($data['mac'][0] . $data['mac'][1] . $data['mac'][3] . $data['mac'][4] . $data['mac'][6] . $data['mac'][7]);
?>
+ | =$data['int'];?> |
=$data['ip'];?> |
">
diff --git a/src/www/status_dhcpv6_leases.php b/src/www/status_dhcpv6_leases.php
index a1f8ab5e3..6ded96d25 100644
--- a/src/www/status_dhcpv6_leases.php
+++ b/src/www/status_dhcpv6_leases.php
@@ -96,6 +96,7 @@ function parse_duid($duid_string) {
return array($iaid, $duid);
}
+$interfaces = legacy_config_get_interfaces(array('virtual' => false));
$leasesfile = services_dhcpdv6_leasesfile();
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
@@ -291,7 +292,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
asort($pools);
}
- foreach (legacy_config_get_interfaces(array("virtual" => false)) as $ifname => $ifarr) {
+ foreach ($interfaces as $ifname => $ifarr) {
if (isset($config['dhcpdv6'][$ifname]['staticmap'])) {
foreach($config['dhcpdv6'][$ifname]['staticmap'] as $static) {
$slease = array();
@@ -426,6 +427,7 @@ endif;?>
+ | =gettext("Interface"); ?>
| =gettext("IPv6 address"); ?> |
=gettext("IAID"); ?> |
=gettext("DUID"); ?> |
@@ -447,6 +449,7 @@ endif;?>
if (is_array($dhcpifconf['staticmap'])) {
foreach ($dhcpifconf['staticmap'] as $staticent) {
if ($data['ip'] == $staticent['ipaddr']) {
+ $data['int'] = htmlspecialchars($interfaces[$dhcpif]['descr']);
$data['if'] = $dhcpif;
break;
}
@@ -459,9 +462,11 @@ endif;?>
}
} else {
$data['if'] = convert_real_interface_to_friendly_interface_name(guess_interface_from_ip($data['ip']));
+ $data['int'] = htmlspecialchars($interfaces[$data['if']]['descr']);
}
?>
+ | =$data['int'];?> |
=$data['ip'];?> |
=$data['iaid'];?> |
=$data['duid'];?> |
|