--- lib/PXElator/dhcpd.pm 2009/08/12 22:56:45 207 +++ lib/PXElator/dhcpd.pm 2009/08/12 23:59:01 208 @@ -24,6 +24,7 @@ use Net::DHCP::Constants 0.67; use CouchDB; +use format; use server; my $debug = server::debug; @@ -89,8 +90,7 @@ my $hostname = $dhcp->getOptionValue(DHO_HOST_NAME); print "$ip ", client::conf( $ip => 'hostname', default => $hostname ), " >> /etc/hosts\n"; - my $audit = { mac => $mac, ip => $ip, hostname => $hostname }; - CouchDB::audit( 'request', $audit ); + my $audit = { mac => format::mac($mac), ip => $ip, hostname => $hostname }; =for later @@ -186,7 +186,7 @@ $packet = new Net::DHCP::Packet( %$packet ); warn "send ",$packet->toString() if $debug; - CouchDB::audit( 'response', $audit ); + CouchDB::audit( $audit->{type}, $audit ); my $reply = IO::Socket::INET->new( LocalAddr => $server::ip,