summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-10-19 15:25:08 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-10-19 15:25:08 +0000
commitdf6f5c659c5b311d818760cb1978e4bd539932f0 (patch)
tree5dc95e1a49188fdf2e97646676f4944a588bc1e5 /usr.sbin
parentf4b52ffe586a64406ed20615bbcfab0960c4f517 (diff)
Correct the value returned by cons_options in the case where overload buffers
are used. It should reflect the end of the main options buffer rather than the start of the options copied into it. ok beck@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/dhcpd/options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/dhcpd/options.c b/usr.sbin/dhcpd/options.c
index 5ee70b04b51..b8c16676655 100644
--- a/usr.sbin/dhcpd/options.c
+++ b/usr.sbin/dhcpd/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.10 2007/10/19 15:16:34 krw Exp $ */
+/* $OpenBSD: options.c,v 1.11 2007/10/19 15:25:07 krw Exp $ */
/* DHCP options parsing and reassembly. */
@@ -316,7 +316,7 @@ cons_options(struct packet *inpacket, struct dhcp_packet *outpacket,
memcpy(&outpacket->options[mainbufix],
buffer, main_buffer_size - mainbufix);
bufix = main_buffer_size - mainbufix;
- length = DHCP_FIXED_NON_UDP + mainbufix;
+ length = DHCP_FIXED_NON_UDP + main_buffer_size;
if (overload & 1) {
if (option_size - bufix <= DHCP_FILE_LEN) {
memcpy(outpacket->file,