DHCPLEASEQUERY is assigned a value of 10, per RFC4388, however Net::DHCP::Contstants (installed with Net::DHCP::Packet) has the pre-standard value of 13. Reproducible: Always Steps to Reproduce: 1. Attempt to use Net::DHCP::Packet with a DHCP_MESSAGE set to DHCPLEASEQUERY 2. Since value of DHCPLEASEQUERY is incorrect (13) the packet is ignored by the DHCP server. 3. The following example is from the documentation for Net::DHCP::Packet. Substituting the value 10 for DHCPLEASEQUERY will change this from a non-working to working script. http://search.cpan.org/~shadinger/Net-DHCP-0.66/lib/Net/DHCP/Packet.pm #!/usr/bin/perl # Simple DHCP client - send a LeaseQuery (by IP) and receive the response use IO::Socket::INET; use Net::DHCP::Packet; use Net::DHCP::Constants; $usage = "usage: $0 DHCP_SERVER_IP DHCP_CLIENT_IP\n"; $ARGV[1] || die $usage; # create a socket $handle = IO::Socket::INET->new(Proto => 'udp', Broadcast => 1, PeerPort => '67', LocalPort => '67', timeout => 5, PeerAddr => $ARGV[0]) or die "socket: $@"; # yes, it uses $@ here # create DHCP Packet $inform = Net::DHCP::Packet->new(op => BOOTREQUEST(), Htype => '0', Hlen => '0', Ciaddr => $ARGV[1], Giaddr => $handle->sockhost(), Xid => int(rand(0xFFFFFFFF)), # random xid DHO_DHCP_MESSAGE_TYPE() => DHCPLEASEQUERY ); # send request $handle->send($inform->serialize()) or die "Error sending LeaseQuery: $!\n"; #receive response $handle->recv($newmsg, 1024) or die; $packet = Net::DHCP::Packet->new($newmsg); print $packet->toString(); Actual Results: DHCP query is ignored Expected Results: DHCP server responds with LEASEQUERY data (or at least logs a failed message in the DHCP daemon's log file) http://search.cpan.org/~shadinger/Net-DHCP-0.66/lib/Net/DHCP/Packet.pm A message has been sent to the package's author shadinger at cpan (dot org)
From what portage package this module comes from?
Do we have Net-DHCP in the tree? There is a bug report at http://rt.cpan.org/Public/Bug/Display.html?id=32962 too Thanks
My bad... I installed this using CPAN, not portage. Apologies for the mistake.