Thanks to Bill Parker (wp02855 at gmail dot com) who identified this issue.
[ISC-Bugs #41485]
+- Updated contrib/dhcp-lease-list.pl to handle garbage in the oui file better
+ and to print out the hostnames a bit better.
+ [ISC-Bugs #41288]
+
Changes since 4.3.3b1
- None
#
# 2013-04-22 - added option to choose lease file, made manufacture information
# optional, sar
+#
+# 2016-01-19 - updated to better trim the manu string and output the hostnames, sar
+
use strict;
use warnings;
use POSIX qw(strftime);
if (defined $oui) {
$manu = join('-', ($_[0] =~ /^(..):(..):(..):/));
$manu = `grep -i '$manu' $oui | cut -f3`;
- chomp($manu);
+ $manu =~ s/^\s+|\s+$//g;
}
return $manu;
}
foreach (@leases) {
if ($opt_format eq 'human') {
- printf("%-19s%-16s%-15s%-20s%-20s\n",
+ printf("%-19s%-16s%-14.14s %-20s%-20s\n",
$_->{'mac'}, # MAC
$_->{'ip'}, # IP address
$_->{'hostname'}, # hostname