--- lib/PXElator/dhcpd.pm 2009/07/31 19:59:28 93 +++ lib/PXElator/dhcpd.pm 2009/07/31 20:07:53 94 @@ -47,7 +47,7 @@ if ( -e "$conf/mac/$mac" ) { my $ip = read_file "$conf/mac/$mac"; - print "$mac old $ip\n"; + print "RENEW $mac $ip\n"; return $ip; } @@ -85,7 +85,7 @@ my $size = 'empty'; $size = length($buf) . ' bytes' if defined $buf; - print "packet from ",$sock->peerhost,":",$sock->peerport," $size\n"; + print "packet from ",$sock->peerhost,":",$sock->peerport," $size\n" if $debug; return unless $buf; my $dhcp = Net::DHCP::Packet->new($buf); @@ -131,7 +131,7 @@ $packet->{DHO_DHCP_MESSAGE_TYPE()} = DHCPOFFER(); } elsif ($messagetype eq DHCPREQUEST()) { my $requested_ip = $dhcp->getOptionValue(DHO_DHCP_REQUESTED_ADDRESS()); - log::mac $mac, "DHCP REQUEST $requested_ip"; + log::mac $mac, "DHCP REQUEST $requested_ip $ip $pxe::file"; if ( $ip eq $requested_ip ) { $packet->{DHO_DHCP_MESSAGE_TYPE()} = DHCPACK(); $packet->{DHO_DHCP_LEASE_TIME()} = 5 * 60; # 5 min @@ -151,7 +151,7 @@ log::mac $mac, "$messagetype igored (bootp?)"; } - warn ">> $mac == $ip server: $server::ip", $pxe::file ? " pxe file: $pxe::file\n" : "\n"; + warn ">> $mac == $ip server: $server::ip", $pxe::file ? " pxe file: $pxe::file\n" : "\n" if $debug; $packet = new Net::DHCP::Packet( %$packet ); warn "send ",$packet->toString() if $debug;