summaryrefslogtreecommitdiffstats
path: root/src/net/udp
diff options
context:
space:
mode:
authorMichael Brown2010-11-30 01:22:49 +0100
committerMichael Brown2011-01-10 04:39:26 +0100
commit6cee8904d1d26cd3503018e9514b8671a9b0a860 (patch)
treec7aa6a5cc3b6ba870d6a54fe92ebe99ee4c046a7 /src/net/udp
parent[hermon] Fix incorrectly-padded sense_port structure (diff)
downloadipxe-6cee8904d1d26cd3503018e9514b8671a9b0a860.tar.gz
ipxe-6cee8904d1d26cd3503018e9514b8671a9b0a860.tar.xz
ipxe-6cee8904d1d26cd3503018e9514b8671a9b0a860.zip
[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>
Diffstat (limited to 'src/net/udp')
-rw-r--r--src/net/udp/dhcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index 64c49cdd9..e6d127ab7 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -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",