[dhcp] Remove redundant length fields in struct dhcp_packet

The max_len field is never used, and the len field is used only by
dhcp_tx().  Remove these two fields, and perform the necessary trivial
calculation in dhcp_tx() instead.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2010-11-30 00:22:49 +00:00
parent dc462e8b3b
commit 6cee8904d1
3 changed files with 12 additions and 16 deletions

View File

@@ -1122,7 +1122,7 @@ static int dhcp_tx ( struct dhcp_session *dhcp ) {
}
/* Transmit the packet */
iob_put ( iobuf, dhcppkt.len );
iob_put ( iobuf, dhcppkt_len ( &dhcppkt ) );
if ( ( rc = xfer_deliver ( &dhcp->xfer, iob_disown ( iobuf ),
&meta ) ) != 0 ) {
DBGC ( dhcp, "DHCP %p could not transmit UDP packet: %s\n",