From f6e3c77ef1a781838efaf37edb5acf8d46f74fc6 Mon Sep 17 00:00:00 2001 From: okuji Date: Mon, 22 May 2000 19:27:35 +0000 Subject: [PATCH] fix a bug in tftp. --- ChangeLog | 6 ++++++ netboot/fsys_tftp.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 218b743d4..cf9ce41e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-05-23 OKUJI Yoshinori + + * netboot/fsys_tftp.c (tftp_dir): Append "0\0" to the request + string, because the "tsize" option must be followed by zero, + according to RFC 2349. + 2000-05-22 OKUJI Yoshinori Synchronize the documentation with the code. diff --git a/netboot/fsys_tftp.c b/netboot/fsys_tftp.c index f5e561f63..a26dd9091 100644 --- a/netboot/fsys_tftp.c +++ b/netboot/fsys_tftp.c @@ -401,8 +401,8 @@ tftp_dir (char *dirname) ch = nul_terminate (dirname); /* Make the request string (octet, blksize and tsize). */ len = (grub_sprintf ((char *) tp.u.rrq, - "%s%coctet%cblksize%c%d%ctsize%c0", - dirname, 0, 0, 0, TFTP_MAX_PACKET, 0, 0) + "%s%coctet%cblksize%c%d%ctsize%c0%c0", + dirname, 0, 0, 0, TFTP_MAX_PACKET, 0, 0, 0) + TFTP_MIN_PACKET + 1); /* Restore the original DIRNAME. */ dirname[grub_strlen (dirname)] = ch;