Hi JTK
I have been kicking this particular can down the road for some time.
Probably the best option would be to select the behaviour, of which i
guess there are three possible:
* die if the packet is too small
* warn if the packet is too small
* do nothing if the packet is too small
The warning mechanism could be a warn() or some sort of side variable.
If you would like to submit a patch I would gladly receive it.
Dean
On 2016-05-04 12:44, jtk@iorc.depaul.edu via RT wrote:
Show quoted text> Tue May 03 22:44:21 2016: Request 114156 was acted upon.
> Transaction: Ticket created by jtk@iorc.depaul.edu
> Queue: Net-DHCP
> Subject: BOOTP minimum length
> Broken in: 0.696, 0.7_006
> Severity: (no value)
> Owner: Nobody
> Requestors: jtk@iorc.depaul.edu
> Status: new
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=114156 >
>
>
> In the marshall subroutine of Net::DHCP::Packet, the length of the
> buffer is checked for first the BOOTP_ABSOLUTE_MIN_LEN and the
> BOOTP_MIN_LEN. These are constants set in Net::DHCP::Constants to 236
> and 300 bytes respectively.
>
> I am using Net::DHCP to parse DHCP packets obtained through a libpcap
> application (using Net::Pcap and other libaries). I've found that
> Net::DHCP is unable to parse these packets due to strict packet size
> minimum checking, even though some real world DHCP packets do not meet
> these strict requirements.
>
> While these DHCP client/server implementations are arguably in the
> wrong, it might be nice for Net::DHCP to generate a warning, perhaps
> at some risk to the caller, rather than to croak when encountering
> these packets?