From 6cee8904d1d26cd3503018e9514b8671a9b0a860 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 30 Nov 2010 00:22:49 +0000 Subject: [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 --- src/net/udp/dhcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net/udp') 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", -- cgit v1.2.3-55-g7522