mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
parent
b9392f59b5
commit
ce94277186
@ -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");?>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="act_sort" data-field="if"><?=gettext("Interface"); ?></td>
|
||||
<td class="act_sort" data-field="ip"><?=gettext("IP address"); ?></td>
|
||||
<td class="act_sort" data-field="mac"><?=gettext("MAC address"); ?></td>
|
||||
<td class="act_sort" data-field="hostname"><?=gettext("Hostname"); ?></td>
|
||||
@ -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]);
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$data['int'];?></td>
|
||||
<td><?=$data['ip'];?></td>
|
||||
<td>
|
||||
<a href="services_wol.php?if=<?=$data['if'];?>&mac=<?=$data['mac'];?>" title="<?=gettext("send Wake on LAN packet to this MAC address");?>">
|
||||
|
||||
@ -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;?>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?=gettext("Interface"); ?></td>
|
||||
<th><?=gettext("IPv6 address"); ?></th>
|
||||
<th><?=gettext("IAID"); ?></th>
|
||||
<th><?=gettext("DUID"); ?></th>
|
||||
@ -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']);
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$data['int'];?></td>
|
||||
<td><?=$data['ip'];?></td>
|
||||
<td><?=$data['iaid'];?></td>
|
||||
<td><?=$data['duid'];?></td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user