Bug #16979 ยป 16979.patch
| src/usr/local/pfSense/include/www/bandwidth_by_ip.inc | ||
|---|---|---|
| 70 | 70 |
// If hostname, description or FQDN is requested then load the locally-known IP address - host/description mappings into an array keyed by IP address. |
| 71 | 71 |
if ($hostipformat != "") {
|
| 72 | 72 |
$domain = config_get_path('system/domain');
|
| 73 |
foreach (array_column(config_get_path('dhcpd', []), 'staticmap') as $hostent) {
|
|
| 74 |
if (($hostent['ipaddr'] != "") && ($hostent['hostname'] != "")) {
|
|
| 75 |
if ($hostipformat == "descr" && $hostent['descr'] != "") {
|
|
| 76 |
$iplookup[$hostent['ipaddr']] = $hostent['descr']; |
|
| 77 |
} else {
|
|
| 78 |
$iplookup[$hostent['ipaddr']] = $hostent['hostname']; |
|
| 79 |
if ($hostipformat == "fqdn") {
|
|
| 80 |
$iplookup[$hostent['ipaddr']] .= "." . $domain; |
|
| 73 |
foreach (array_column(config_get_path('dhcpd', []), 'staticmap') as $ifsmaps) {
|
|
| 74 |
foreach ($ifsmaps as $hostent) {
|
|
| 75 |
if (($hostent['ipaddr'] != "") && ($hostent['hostname'] != "")) {
|
|
| 76 |
if ($hostipformat == "descr" && $hostent['descr'] != "") {
|
|
| 77 |
$iplookup[$hostent['ipaddr']] = $hostent['descr']; |
|
| 78 |
} else {
|
|
| 79 |
$iplookup[$hostent['ipaddr']] = $hostent['hostname']; |
|
| 80 |
if ($hostipformat == "fqdn") {
|
|
| 81 |
$iplookup[$hostent['ipaddr']] .= "." . $domain; |
|
| 82 |
} |
|
| 81 | 83 |
} |
| 82 | 84 |
} |
| 83 | 85 |
} |