diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2013-03-15 13:13:11 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2013-03-15 13:13:11 +0000 |
commit | f74b8d7a0b2d790bb78dae1b624025bf013c05ab (patch) | |
tree | ed66cd07737050f69d5880daca6d6528c4869cbb | |
parent | b8f84e76184dcbe5dfdf308c1d21569bcef0162c (diff) |
let oack use the full buffer space to build its packet, not just the size
negotiated for data tranfsers.
this lets people negotiate 2 byte transfers with other options too if they
want. im looking at you Maxime Villard.
-rw-r--r-- | usr.sbin/tftpd/tftpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/tftpd/tftpd.c b/usr.sbin/tftpd/tftpd.c index 24dbab7bab8..21922f49a89 100644 --- a/usr.sbin/tftpd/tftpd.c +++ b/usr.sbin/tftpd/tftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tftpd.c,v 1.11 2013/03/15 12:52:03 dlg Exp $ */ +/* $OpenBSD: tftpd.c,v 1.12 2013/03/15 13:13:10 dlg Exp $ */ /* * Copyright (c) 2012 David Gwynne <dlg@uq.edu.au> @@ -1396,7 +1396,7 @@ oack(struct tftp_client *client) tp = (struct tftphdr *)client->buf; bp = (char *)tp->th_stuff; - size = client->packet_size - 2; + size = sizeof(client->buf) - 2; tp->th_opcode = htons((u_short)OACK); for (i = 0; i < NOPT; i++) { |